New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A call to client.Cluster.StatsAsync fails with JSON serialization error #8015
Comments
Hi, thanks for reporting. This looks like a specification issue. As far as I can tell, all other places are using |
At this point, I ended up with a workaround to issue a plain REST request to /_cluster/stats and parse the raw JSON response. |
Hey @flobernd, do you maybe have an ETA when these changes are gonna be available within .net libraries? 🤔 We're experiencing the same issue for some time now, and I was wondering should I do a workaround or wait for a proper fix? :) Regards,
|
Hi @milos-matic-comparis! Did you try the latest 8.13 version? The fix should be included there 🙂 |
Hey @flobernd, I did try with 8.12.1, 8.13.0 and 8.13.5 but it's still throwing the same exception. I also bumped up Elastic.Transport 0.4.18 :( Stack trace with 8.13.0: Still, we will probably wait for future releases since upgrading to 8.13.x and Elastic.Transport also introduces dependency to System.Text.Json 8.x.x and that is not an easy thing to upgrade in our system :D I'll keep an eye to the changelogs for sure :) |
Ouch. I see the problem now. My PR in the specification repository changed the type in the wrong place. I'll fix that 🙂 |
Great, tnx for the effort 🤓 |
Elastic.Clients.Elasticsearch version: 8.11.0
Elasticsearch version: 8.11.0
.NET runtime version: net7.0, net6.0
Operating system version: Windows 10
Description of the problem including expected versus actual behavior:
Run a plain request to get cluster stats:
var stats = await client.Cluster.StatsAsync(new ClusterStatsRequest()).ConfigureAwait(false);
It fails with the following error:
Notes
This is only happening when the
total_count
property of thequery_cache
object of the target cluster exceeds theint.MaxValue
. In my case, if I run the same query in the ES console, I get2153022551
for the.indices.query_cache.total_count
, which is obviously bigger thanint.MaxValue
(2147483647
).The type of the
TotalCount
property isint
, but should probably belong
.The text was updated successfully, but these errors were encountered: