Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence redesign #4589

Merged
merged 89 commits into from
Oct 4, 2020
Merged

Conversation

chimp1984
Copy link
Contributor

@chimp1984 chimp1984 commented Oct 2, 2020

Based on #4586
Replaces #4527

Attempt for a more clean commit history (still a lot). As merge was getting pretty difficult I decided to re-apply all changes again and compare with old PR code and with base of #4586. Hope no bugs entered by the challenging merge process.

Update: As #4586 is now merged to master this PR got rebased on master.

Remove UserThread.execute on shutdown
Rename threadname
…nding data to disk

Use new readAllPersisted method instead of setupPersistedDataHosts. Run read tasks in a thread in parallel.

Read is only done at startup.

Remove unused restart method
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
…e instead

We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
We will not need threading support anymore once we use the new persistenceManager as serialisation is done on the userThread.
Use AtomicReference instead of array, add final
Remove clone from SequenceNumberMap.
Add comment
Use decrementAndGet instead of getAndDecrement

Tested cases when there is an exception at write to disk, but as we call the result handler in the finally clause we get always called onWriteCompleted, so it cannot happen that we get stuck.
…did not miss any state update.

Priority.HIGH stores are all those which contain private data. Others can be rebuilt from network data or are not critical like navigationPath.
…which did not have priority as a param.

Make initializePersistenceManager in StorageService abstract to enforce in concrete class to define priority.

Change priorities for future renaming to a different meaning. instead of priority we want to describe the category: private data, public data,.... will come in next commit
… intention of the usage.

Rename:
LOW to NETWORK
MID to PRIVATE_LOW_PRIO
HIGH to PRIVATE

Change delay of MID/PRIVATE_LOW_PRIO from 30 min to 2 hours (we had different datastores before using it, now its only real low prio stores)

Add comment to each enum
@chimp1984 chimp1984 force-pushed the persistence-redesign branch from fbaef26 to 6693a03 Compare October 3, 2020 17:48
@chimp1984
Copy link
Contributor Author

Rebased again latest master merge.

@sqrrm
Copy link
Member

sqrrm commented Oct 4, 2020

Review needed from @ManfredKarrer to be able to merge this

chimp1984 and others added 5 commits October 4, 2020 12:49
Remove ObservableList methods from PersistableList
Let DisputeList and TradableList extend PersistableListAsObservable
Fix param names
ManfredKarrer
ManfredKarrer previously approved these changes Oct 4, 2020
Copy link
Contributor

@ManfredKarrer ManfredKarrer left a comment

Choose a reason for hiding this comment

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

utACK

This avoids frequent write at dao sync and better performance.
…hods.

We do not set the collection as list but we fill the list created via the createList method.
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

ACK

@sqrrm sqrrm merged commit fd65bcc into bisq-network:master Oct 4, 2020
@chimp1984 chimp1984 deleted the persistence-redesign branch October 4, 2020 22:43
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.

3 participants