Skip to content

Fix GigaMap#set#602

Merged
fh-ms merged 3 commits intomainfrom
gigamap-set-fix
Mar 5, 2026
Merged

Fix GigaMap#set#602
fh-ms merged 3 commits intomainfrom
gigamap-set-fix

Conversation

@fh-ms
Copy link
Contributor

@fh-ms fh-ms commented Mar 5, 2026

Summary

  • Fix for lazy access issue in GigaMap#internalSet, resolving incorrect value setting under specific conditions.
  • Update to GigaMap#set test functionality to ensure proper behavior after data reload.

@fh-ms fh-ms requested a review from zdenek-jonas March 5, 2026 12:55
@fh-ms fh-ms added bug Something isn't working GigaMap labels Mar 5, 2026
@zdenek-jonas zdenek-jonas requested a review from Copilot March 5, 2026 12:58
Copy link
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

This PR fixes GigaMap#set behavior after a restart by ensuring internalSet() properly loads lazily-referenced segments before updating an entity, and updates the restart test so it exercises set() without pre-loading data.

Changes:

  • Update GigaMap.Default#internalSet to use Lazy#get() instead of peek() for level2/level1 segment access.
  • Adjust SetTest to call set() immediately after reload (without a prior query) to reproduce/guard the lazy-loading scenario.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
gigamap/gigamap/src/main/java/org/eclipse/store/gigamap/types/GigaMap.java Ensures set() loads required lazy segments so updates work after reload.
gigamap/gigamap/src/test/java/org/eclipse/store/gigamap/restart/SetTest.java Makes the restart test cover set() when segments haven’t been pre-loaded.

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

Use markChanged() instead of manual state-change flags to ensure Lazy entries are marked as used, preventing them from being cleared before storeChangedChildren() can persist the update.
@fh-ms fh-ms added this to the 4.0.0 milestone Mar 5, 2026
@fh-ms fh-ms merged commit a4af3fe into main Mar 5, 2026
11 checks passed
@fh-ms fh-ms deleted the gigamap-set-fix branch March 5, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working GigaMap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants