-
Notifications
You must be signed in to change notification settings - Fork 594
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
Drop DB v6 indexes on close #2335
Conversation
Signed-off-by: Alex Goodman <[email protected]>
5d4079c
to
e795ae5
Compare
"immutable=1", | ||
"cache=shared", | ||
"mode=ro", | ||
var heavyWriteStatements = []string{ |
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.
nit: this doesn't seem to have options directly related to write performance but rather memory, with an option named allowLargeMemoryFootprint
should this be largeMemoryFootprintStatements
?
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.
#2335 (comment) so when there are heavy writes expected we want to allow for a larger memory footprint (to improve write performance).
} | ||
} | ||
|
||
if cfg.truncate && cfg.allowLargeMemoryFootprint { |
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.
Is the memory footprint related to truncating?
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 is -- when we start with an empty DB we will be doing a lot of writing (and allowing for a larger memory footprint in those cases allows for writing to the DB much faster).
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.
(None of the prior review was blocking; didn't approve then since it was auto-merge)
Signed-off-by: Alex Goodman <[email protected]>
This PR makes the following adjustments to the v6 store:
When opening a DB for reading or writing:
When opening an EMPTY db for writing:
When closing a newly-populated DB:
When importing a DB:
v6.Hydrater
)Other changes made in this PR:
internal.NewDB
tov6.NewLowLevelDB
so that it has direct access to initial data and models to be migrated (so getting agorm.DB
instance is consistent)