Skip to content
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

fix: resolves the crash with MGET and duplicate keys #2471

Merged
merged 1 commit into from
Jan 25, 2024
Merged

fix: resolves the crash with MGET and duplicate keys #2471

merged 1 commit into from
Jan 25, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Jan 25, 2024

Fixes #2465

@romange romange requested a review from chakaz January 25, 2024 09:16
Fixes #2465

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Copy link
Collaborator

@chakaz chakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nits, feel free to ignore

Comment on lines +532 to +537
string key_arr;
for (unsigned j = 0; j < keys.size(); ++j) {
absl::StrAppend(&key_arr, keys[j], ",");
}
key_arr.pop_back();
LOG(WARNING) << "The keys requested are: [" << key_arr << "]";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string key_arr;
for (unsigned j = 0; j < keys.size(); ++j) {
absl::StrAppend(&key_arr, keys[j], ",");
}
key_arr.pop_back();
LOG(WARNING) << "The keys requested are: [" << key_arr << "]";
LOG(WARNING) << "The keys requested are: [" << absl::StrJoin(keys, ',') << "]";

// bump up the key again, and the first iterator will be invalidated.
// TODO: to understand better the dynamics of this scenario and to fix it.
if (it->first != keys[i]) {
LOG(WARNING) << "Inconcistent key(" << i << "), expected " << keys[i] << " but found "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG(WARNING) << "Inconcistent key(" << i << "), expected " << keys[i] << " but found "
LOG(WARNING) << "Inconsistent key(" << i << "), expected " << keys[i] << " but found "

@romange romange merged commit f69f2ec into main Jan 25, 2024
10 checks passed
@romange romange deleted the Pr2 branch January 25, 2024 09:51
romange added a commit that referenced this pull request Jan 25, 2024
Fixes #2465

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
adiholden added a commit that referenced this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Periodic crash on new version
2 participants