Skip to content

Regression test: type dictionary exported once per store commit - #807

Open
hrstoyanov wants to merge 1 commit into
eclipse-store:mainfrom
hrstoyanov:test/type-dictionary-export-coalescing
Open

Regression test: type dictionary exported once per store commit#807
hrstoyanov wants to merge 1 commit into
eclipse-store:mainfrom
hrstoyanov:test/type-dictionary-export-coalescing

Conversation

@hrstoyanov

Copy link
Copy Markdown

Summary

Regression test for the coalesced type dictionary export (serializer fix in eclipse-serializer/serializer#314).

A single storeRoot serializing a large root graph discovers and registers many distinct types. The type dictionary must be exported exactly once per store commit, not once per registered type — the crash-safe export (temp-file write + fsync + delete + move) is comparatively expensive, so per-type exports made a first store of a ~280-type graph take ~2.9s.

Test

TypeDictionaryExportCoalescingTest:

  1. Stores a root graph of 400 entities across 8 distinct types via a counting file-handler decorator.
  2. Asserts exactly 1 type dictionary export for the whole storeRoot.
  3. Restarts the storage against the same directory and reloads all 400 entities, proving the single coalesced export produced a complete dictionary.

Dependency

Requires the serializer fix in eclipse-serializer/serializer#314 (without it, the test asserts 1 export and fails with ~280).

A single storeRoot serializing a graph of many distinct types discovers and
registers all of them, and the type dictionary must be exported exactly once
per store commit rather than once per registered type (the crash-safe export
is comparatively expensive). Verifies exactly one export per storeRoot and
that the coalesced dictionary is complete by restarting the storage and
reloading the graph.
@hrstoyanov

hrstoyanov commented Aug 5, 2026

Copy link
Copy Markdown
Author

@fh-ms @hg-ms @zdenek-jonas
After upgrading to the latest unpublished version if ES, my junit tests started taking 45x the time to run! The PR above (and the one for the serializer) is a quick fix for me to keep my CI/CD usable , and seems correct, but I do think it addresses a real performance degradation introduced recently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant