mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
chore: add more logs around the duplicate value case in small_bins (#3254)
Helps investigating #3252 Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
830d73a888
commit
506ecbc3cd
4 changed files with 20 additions and 9 deletions
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
@ -88,10 +88,10 @@ jobs:
|
|||
touch /mnt/foo
|
||||
ls -la /mnt/foo
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.4
|
||||
uses: mozilla-actions/sccache-action@v0.0.5
|
||||
|
||||
- name: Configure Cache Env
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
|
@ -178,8 +178,9 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: regression_logs
|
||||
path: /tmp/failed/*
|
||||
|
||||
path: |
|
||||
/tmp/**/*
|
||||
/tmp/*
|
||||
|
||||
lint-test-chart:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -10,7 +10,9 @@ extern "C" {
|
|||
|
||||
using namespace std;
|
||||
|
||||
ABSL_FLAG(string, cluster_mode, "", "Cluster mode supported. Default: \"\"");
|
||||
ABSL_FLAG(string, cluster_mode, "",
|
||||
"Cluster mode supported. Possible values are "
|
||||
"'emulated', 'yes' or ''");
|
||||
|
||||
namespace dfly::cluster {
|
||||
namespace {
|
||||
|
|
|
@ -272,7 +272,7 @@ template util::fb2::Future<size_t> TieredStorage::Modify(DbIndex dbid, std::stri
|
|||
std::function<size_t(std::string*)> modf);
|
||||
|
||||
void TieredStorage::Stash(DbIndex dbid, string_view key, PrimeValue* value) {
|
||||
DCHECK(!value->IsExternal() && !value->HasIoPending());
|
||||
CHECK(!value->IsExternal() && !value->HasIoPending());
|
||||
|
||||
// TODO: When we are low on memory we should introduce a back-pressure, to avoid OOMs
|
||||
// with a lot of underutilized disk space.
|
||||
|
@ -296,7 +296,7 @@ void TieredStorage::Stash(DbIndex dbid, string_view key, PrimeValue* value) {
|
|||
}
|
||||
|
||||
if (ec) {
|
||||
VLOG(1) << "Stash failed immediately" << ec.message();
|
||||
LOG(ERROR) << "Stash failed immediately" << ec.message();
|
||||
visit([this](auto id) { op_manager_->ClearIoPending(id); }, id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,8 +40,16 @@ std::optional<SmallBins::FilledBin> SmallBins::Stash(DbIndex dbid, std::string_v
|
|||
|
||||
current_bin_bytes_ += value_bytes;
|
||||
|
||||
bool inserted = current_bin_.emplace(std::make_pair(dbid, key), value).second;
|
||||
CHECK(inserted);
|
||||
auto [it, inserted] = current_bin_.emplace(std::make_pair(dbid, key), value);
|
||||
if (!inserted) {
|
||||
LOG(ERROR) << "Duplicate key " << key << " dbid " << dbid;
|
||||
LOG(ERROR) << "Values are same: " << int(it->second == value);
|
||||
for (const auto& [key, _] : current_bin_) {
|
||||
LOG(ERROR) << "Existing ones: " << key.first << " " << key.second;
|
||||
}
|
||||
|
||||
LOG(FATAL) << "Crashing!";
|
||||
}
|
||||
DVLOG(2) << "current_bin_bytes: " << current_bin_bytes_
|
||||
<< ", current_bin_size:" << current_bin_.size();
|
||||
return filled_bin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue