Skip to content

Can't persist Eclipse Collection's LongArrayList (Custom TypeHandler not working as expected) #247

Answered by hg-ms
Sandared asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
You found a more complex case, the thing you missed is the “lazy Storing” behavior of Microstream (https://docs.microstream.one/manual/storage/storing-data/lazy-eager-full.html).

Here is what happen in detail:
In your PersistableLongArrayList you defined a typeHandler that stores a reference to a long-Array.
During the first store microstream detects that the referenced array has not been persisted before will persist it. Subsequent stores will detect that the array has been persisted already and skip it because of the lazy storing behavior. If you add enough elements to the LongArrayList the list will internally create new and lager array. This new array will be recognized and per…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Sandared
Comment options

Answer selected by Sandared
Comment options

You must be logged in to vote
2 replies
@Sandared
Comment options

@hg-ms
Comment options

hg-ms Sep 22, 2021
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants