-
Notifications
You must be signed in to change notification settings - Fork 990
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
chore: run memory decommit after snapshot load/save #3828
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
736131b
chore: run memory decommit after snapshot load/save
kostasrim 02e1b76
small fixes
kostasrim 0fcaad2
add kAll
kostasrim 63276aa
comments
kostasrim 0765ffe
refactor tests
kostasrim 1fa33b6
fix: destroy shard flows on replica stop
kostasrim 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,7 +282,12 @@ class ServerState { // public struct - to allow initialization. | |
// Decommits 3 possible heaps according to the flags. | ||
// For decommit_glibcmalloc the heap is global for the process, for others it's specific only | ||
// for this thread. | ||
enum { kDataHeap = 1, kBackingHeap = 2, kGlibcmalloc = 4 }; | ||
enum { | ||
kDataHeap = 1, | ||
kBackingHeap = 2, | ||
kGlibcmalloc = 4, | ||
kAll = kDataHeap | kBackingHeap | kGlibcmalloc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is an anonymous enum, I'd use a more verbose name. Maybe |
||
}; | ||
void DecommitMemory(uint8_t flags); | ||
|
||
// Exec descriptor frequency count for this thread. | ||
|
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.
when is this null?
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.
tests 😄
For example
LoadEmpty
inrdb_test.cc
, does not runRdbLoad::Load
in a shard thread so it crashes.I do not know if a similar unit test exist for
rdb_save
but I assumed this is the case and I added this here as well to avoid crashes like thatThere 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.
that odd because rdb_save calls service init. please check this again why it is not set
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.
I don't see why this is odd. The service is created but we just don't run the rdb loader on a proactor thread