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 accidentally set low priority #5722

Merged
merged 2 commits into from
May 23, 2023

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented May 23, 2023

  • Fix accidentally set LowPriority write flag when DisableWal is set causing snap sync to be very slow.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • Snapsync can now reach above 250k node per sec, which seems to be the limit with low priority write.

@asdacap asdacap requested a review from LukaszRozmej May 23, 2023 03:05
@LukaszRozmej LukaszRozmej merged commit 584099a into master May 23, 2023
@LukaszRozmej LukaszRozmej deleted the fix/accidental-low-priority-flag branch May 23, 2023 09:06
@@ -514,17 +514,17 @@ internal void SetWithColumnFamily(ReadOnlySpan<byte> key, ColumnFamilyHandle? cf

public WriteOptions? WriteFlagsToWriteOptions(WriteFlags flags)
{
if ((flags & WriteFlags.LowPriorityAndNoWAL) != 0)
if ((flags & WriteFlags.LowPriorityAndNoWAL) == WriteFlags.LowPriorityAndNoWAL)
Copy link
Member

Choose a reason for hiding this comment

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

Would maybe add comment that this is a combined flags enum so needs a strict equality check (rather than not zero)

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.

3 participants