This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
Prefix child db by threadid when starting #422
Closed
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.
Signed-off-by: Carson Farmer [email protected]
Description
This PR changes the internals of how we "start" Databases. Now, the actual "opening" of the database is deferred until it is actually "started". Additionally, while we can "create" a database and its underlying components (dispatcher, event handler, etc) at construction time, none of this stuff is turned on until we actually start it. Additionally, all DB keys are prefixed by the threadid in a transparent way. So that, in theory, a user doesn't really need to worry about threadid at all. Additionally, this makes the database "name" (which is really just sugar for the developer) default to "thread.db". For developer who want to "sandbox" their db from other user dbs, they can specify their own name.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
All existing tests should pass. Additionally, some previous behavior that was expected to fail, should no longer fail, so some checks for this were actually removed. With that in mind, some additional tests should be applied here.
Checklist: