-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fake PR to test integrate oah set branch #7247
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,11 @@ ABSL_DECLARE_FLAG(std::string, admin_bind); | |
| ABSL_DECLARE_FLAG(strings::MemoryBytesFlag, maxmemory); | ||
| ABSL_DECLARE_FLAG(uint32_t, proactor_threads); | ||
| ABSL_DECLARE_FLAG(std::string, dbfilename); | ||
| ABSL_DECLARE_FLAG(bool, use_oah_set); | ||
|
|
||
| namespace dfly { | ||
| extern bool g_use_oah_set; // defined in core/oah_set.h | ||
| } | ||
|
|
||
| #ifdef USE_ABSL_LOG | ||
| ABSL_FLAG(bool, alsologtostderr, false, "also log messages to stderr in addition to logfiles"); | ||
|
|
@@ -1139,6 +1144,7 @@ Usage: dragonfly [FLAGS] | |
| LOG(WARNING) << "SWAP is enabled. Consider disabling it when running Dragonfly."; | ||
|
|
||
| dfly::max_memory_limit = absl::GetFlag(FLAGS_maxmemory); | ||
| dfly::g_use_oah_set = absl::GetFlag(FLAGS_use_oah_set); | ||
|
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. The PR title/description look like placeholders and don’t describe the change intent, which makes the review/audit trail hard to follow. Please align with the repo PR guideline that titles be descriptive and summaries explain what/why (Rule: AGENTS.md). Severity: low 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
|
|
||
| if (dfly::max_memory_limit == 0) { | ||
| LOG(INFO) << "maxmemory has not been specified. Deciding myself...."; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
For
OAHSet,ClearStep()advancescursorup toCapacity()(entries_.size), but this code compares againstBucketCount()(2^capacity_log) which is smaller; that can terminate early and delete the set while displacement buckets still contain live entries. This looks like it can leak memory and/or leave dangling state during async deletion.Severity: high
Other Locations
src/server/db_slice.cc:1843src/server/db_slice.cc:1846🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.