-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Having promises potentially be concurrent was originally thought to be an optimization, but overall after extensive benchmarking, it may not be as much of an optimization as thought. Previously, records that failed independent of producing could have their promises called whenever. Produced records would always have their promises called at the end of handling a produce response. Technically, this means that if a broker has max produce requests in flight, starting a new produce request would block on finishing promises for a previous one if the promises were slow. Now, we send all promises to a dedicated loop. This keeps our prior guarantee of strict ordering and divorces promises from produce requests. I expect the common case for promises is to serialize the records anyway, which implies locking within the promise. Hopefully, that locking can now be removed. It is possible that promises that did no work or did atomic work could be slower now, but extensive testing with franz-go's bench utility (and changing the code to auto-success produce requests) shows no difference -- if anything, serializing may be slightly faster.
- Loading branch information
Showing
8 changed files
with
179 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.