This repository has been archived by the owner on Aug 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Store-native TTL management #34
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
80fc9f0
migrate from bespoke TTL manager to db-managed TTLs.
raulk 9277207
remove deprecated ttlManager.
raulk afc9ee9
performance optimisation round.
raulk 7e645fa
do not prettify cache keys (peer ids).
raulk 23be462
Merge branch 'txndatastore' into ttldatastore
raulk 7c5cf50
adjust ttl tests as badger doesn't support sub-second ttl.
raulk b75ed37
reintroduce import prefixes.
raulk 7976022
gx bubble up go-datastore and go-ds-badger.
raulk 3a4d809
remove unnecessary return values.
raulk 4b2c121
add a test and fix broken logic.
raulk 5b9ad98
remove noop Stop() in address book.
raulk 0f81bdf
introduce struct for persisted value.
raulk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depending on badger directly this far down is a bit weird. Especially since its not something we are tied to at this point (and may move away from)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just used in tests to create test instances -- not in production code. Any other way you can think of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Java, this dependency would be in
test
scope in maven or gradle. No such thing in Go / gx AFAIK.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a gx thing.
go get
by default won't download test dependency packages. The-t
flag is required to download test deps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How difficult would it be to add basic ttl support to the in-memory datastore. It doesn't have to be fancy, it could literally be a:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the datastore not the peerstore, right? It would be pretty straightforward, I'll work on it!
Eventually (when KeyBook and PeerMetadata are migrated to use the datastore), it may make sense to remove the in-memory implementation of the peerstore, and have the constructor delegate to a map-based datastore peerstore.
That's almost a tongue twister!