Improve reading logic for transaction meter values#2038
Merged
Conversation
goekay
commented
May 6, 2026
Member
- Refactor for simplicity: Replace unioned meter value lookups with one explicit query
- Fix: Keep timestamp fallback to unassigned meter values only
- Improve nuance: Use half-open zombie transaction cutoff before next transaction start
* Refactor for simplicity: Replace unioned meter value lookups with one explicit query * Fix: Keep timestamp fallback to unassigned meter values only * Improve nuance: Use half-open zombie transaction cutoff before next transaction start
Review Summary by QodoSimplify transaction meter value reading with improved zombie transaction handling
WalkthroughsDescription• Refactor meter value query logic from UNION to single explicit query • Fix timestamp fallback to exclude meter values assigned to other transactions • Improve zombie transaction cutoff using half-open interval [start, next) • Add integration test for zombie transaction meter value boundary handling Diagramflowchart LR
A["Transaction Details Query"] --> B["Meter Value Selection"]
B --> C["Case 1: Transaction ID Match"]
B --> D["Case 2: Timestamp + Unassigned"]
C --> E["Combined OR Condition"]
D --> E
E --> F["Single Query Result"]
G["Half-open Interval"] --> H["Start Inclusive"]
G --> I["Next Start Exclusive"]
H --> E
I --> E
File Changes1. src/main/java/de/rwth/idsg/steve/repository/impl/TransactionRepositoryImpl.java
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.