Skip to content

Fix serialization of NodeGpuStatsResponse when no GPU is present#142937

Merged
ChrisHegarty merged 4 commits intoelastic:mainfrom
ChrisHegarty:gpu_stats_ser_fix
Feb 24, 2026
Merged

Fix serialization of NodeGpuStatsResponse when no GPU is present#142937
ChrisHegarty merged 4 commits intoelastic:mainfrom
ChrisHegarty:gpu_stats_ser_fix

Conversation

@ChrisHegarty
Copy link
Copy Markdown
Contributor

@ChrisHegarty ChrisHegarty commented Feb 24, 2026

NodeGpuStatsResponse uses writeVLong for totalGpuMemoryInBytes, which throws IllegalStateException on the sentinel value -1 returned by GPUSupport.getTotalGpuMemory() when no compatible GPU is available. The fix is to replace -1 with 0L (which does not change the semantics), and add a serialization round-trip test that reproduces the original failure and validates fix.

No transport version change is needed since the serial-form is not in any shipping release.

resolves #142936

@ChrisHegarty ChrisHegarty added >refactoring :Search Relevance/Vectors Vector search Team:Search - Relevance The Search organization Search Relevance team labels Feb 24, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine added Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0 labels Feb 24, 2026
@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Feb 24, 2026
@mayya-sharipova
Copy link
Copy Markdown
Contributor

+1 for new changes as well

@ChrisHegarty ChrisHegarty merged commit ad37690 into elastic:main Feb 24, 2026
35 checks passed
@ChrisHegarty ChrisHegarty deleted the gpu_stats_ser_fix branch February 24, 2026 16:17
szybia added a commit to szybia/elasticsearch that referenced this pull request Feb 24, 2026
…on-sliced-reindex

* upstream/main:
  Activity logging improvements (elastic#142901)
  Fix serialization of NodeGpuStatsResponse when no GPU is present (elastic#142937)
  Add doc on master elections in DistributedArchitectureGuide (elastic#142435)
  ESQL: Account for missing StubRelation due to SurrogateExpressions replacement (elastic#142882)
  Add BulkByScrollTask Serialization Tests (elastic#142697)
  Rebalance CI test partitions to reduce Part3 bottleneck (elastic#142930)
  Mute org.elasticsearch.xpack.esql.qa.multi_node.EsqlClientYamlIT test {p0=esql/40_tsdb/to_aggregate_metric_double with multi_values} elastic#142964
  Bump OpenTelemetry dependencies (elastic#142323)
  SQL: add support for API key to JDBC and CLI (elastic#142021)
  Ensure requested capability exists (elastic#142695)
  Warn and fall back to local branches.json (elastic#142606)
  [CI] Mute testWithFetchFailures, testAddCompletionListenerScheduleErr… (elastic#142926)
  ESQL: Add support for ORC file format (elastic#142900)
  Update wolfi (versioned) (elastic#142948)
  Add BulkByScrollResponse Serialization Tests (elastic#142688)
  Run 25_id_generation with and without synthetic id (elastic#142770)
mayya-sharipova pushed a commit to mayya-sharipova/elasticsearch that referenced this pull request Feb 24, 2026
…stic#142937)

NodeGpuStatsResponse uses writeVLong for totalGpuMemoryInBytes, which throws IllegalStateException on the sentinel value -1 returned by GPUSupport.getTotalGpuMemory() when no compatible GPU is available. The fix is to replace -1 with 0L (which does not change the semantics), and add a serialization round-trip test that reproduces the original failure and validates fix.

resolves elastic#142936
elasticsearchmachine pushed a commit that referenced this pull request Feb 24, 2026
…2937) (#142991)

NodeGpuStatsResponse uses writeVLong for totalGpuMemoryInBytes, which throws IllegalStateException on the sentinel value -1 returned by GPUSupport.getTotalGpuMemory() when no compatible GPU is available. The fix is to replace -1 with 0L (which does not change the semantics), and add a serialization round-trip test that reproduces the original failure and validates fix.

resolves #142936

Co-authored-by: Chris Hegarty <62058229+ChrisHegarty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search Relevance/Vectors Vector search serverless-linked Added by automation, don't add manually Team:Search - Relevance The Search organization Search Relevance team Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure serializing org.elasticsearch.xpack.gpu.NodeGpuStatsResponse

4 participants