Commit 0dbfa69
committed
kv: run flushRawPending in goroutine to avoid blocking the first caller
The first commitRaw caller that becomes the flusher was blocked
synchronously in the flush loop, potentially processing unrelated
batches long after its own result was ready. Running the flush in
a goroutine lets each caller block only on its own done channel.1 parent 3b65480 commit 0dbfa69
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
0 commit comments