Skip to content

fix: Buffer.addPending sets writeRequired #1015

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

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private[akka] case class Buffer(
}

final def addPending(write: AwaitingWrite): Buffer = {
copy(size = size + write.events.size, pending = pending :+ write)
copy(size = size + write.events.size, pending = pending :+ write, writeRequired = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems innocent and correct but difficult to see the full consequences. Tests are failing.

I looked at other places where we add to pending and then it's indeed writeRequired = true aside from rebuild. Maybe it's always set to true in rebuild also via the add but that is not immediately obvious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the case of rebuild, it starts empty, then repeatedly adds, so anything in pending after the repeated adds came via add.

I haven't yet looked through the test failures to see what they should be.

}

def writeComplete(): Buffer = {
Expand Down