Skip to content

fix: DH-21978: WorkerHeapSize column is Incorrect.#7937

Merged
cpwright merged 2 commits intodeephaven:mainfrom
cpwright:cpw/heapsize-fix
Apr 27, 2026
Merged

fix: DH-21978: WorkerHeapSize column is Incorrect.#7937
cpwright merged 2 commits intodeephaven:mainfrom
cpwright:cpw/heapsize-fix

Conversation

@cpwright
Copy link
Copy Markdown
Contributor

This is the Core half of the fix, the performance queries are assuming the heap size we are analyzing is the same size as the current worker which is not a generally valid assumption. The Core+ half of the fix is to write the heap size down to permanent logs for later analysis.

This is the Core half of the fix, the performance queries are assuming the heap
size we are analyzing is the same size as the current worker which is not a
generally valid assumption.  The Core+ half of the fix is to write the heap
size down to permanent logs for later analysis.
@cpwright cpwright requested a review from Copilot April 24, 2026 18:46
@cpwright cpwright self-assigned this Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

No docs changes detected for 238690b

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes incorrect WorkerHeapSize handling in performance queries by stopping the assumption that the heap size being analyzed matches the current worker, and instead sourcing heap size from the log stream itself.

Changes:

  • Removed injection of WorkerHeapSize based on the current worker from PerformanceQueriesGeneral.
  • Added a WorkerHeapSize column to query/update performance stream publishers and populated it once per publisher from the JVM max heap.
  • Introduced a small HeapSize utility to centralize max-heap retrieval for performance logging.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
extensions/performance/src/main/java/io/deephaven/engine/table/impl/util/PerformanceQueriesGeneral.java Stops injecting current-worker heap size into performance query views; relies on logged heap size instead.
engine/table/src/main/java/io/deephaven/engine/table/impl/util/QueryPerformanceStreamPublisher.java Extends query performance stream schema to include WorkerHeapSize and publishes the value.
engine/table/src/main/java/io/deephaven/engine/table/impl/util/QueryOperationPerformanceStreamPublisher.java Extends operation performance stream schema to include WorkerHeapSize and publishes the value.
engine/table/src/main/java/io/deephaven/engine/table/impl/util/HeapSize.java New helper for retrieving JVM max heap size for logging.
engine/table/src/main/java/io/deephaven/engine/table/impl/perf/UpdatePerformanceStreamPublisher.java Extends update performance stream schema to include WorkerHeapSize and publishes the value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cpwright cpwright requested a review from devinrsmith April 24, 2026 18:56
Copy link
Copy Markdown
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, maximum heap size can change over time. I wonder if we want to try and capture this possibility?

https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryUsage.html

The maximum amount of memory may change over time if defined.

@cpwright cpwright enabled auto-merge (squash) April 27, 2026 12:24
@cpwright cpwright merged commit 0cd9ac3 into deephaven:main Apr 27, 2026
24 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants