Skip to content

Commit 5aeb301

Browse files
committed
compare
1 parent b1a15bc commit 5aeb301

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/pull-db-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,11 @@ jobs:
162162
# https://dev.mysql.com/doc/refman/8.0/en/optimizing-innodb-diskio.html
163163
MYSQL_EXTRA_FLAGS: >
164164
--disable-log-bin
165-
--innodb-buffer-pool-size=1G
165+
--innodb-buffer-pool-size=2G
166166
--innodb-doublewrite=off
167167
--innodb-flush-log-at-trx-commit=0
168168
--innodb-flush-method=nosync
169+
--innodb-fsync-threshold=100000
169170
ports:
170171
- "3306:3306"
171172
elasticsearch:

modules/queue/workergroup.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ func (q *WorkerPoolQueue[T]) doWorkerHandle(batch []T) {
108108
return // do not requeue items when flushing, since all items failed, requeue them will continue failing.
109109
}
110110
log.Error("Queue %q failed to handle batch of %d items, backoff for a few seconds", q.GetName(), len(batch))
111+
// TODO: ideally it shouldn't "sleep" here (blocks the worker, then blocks flush).
112+
// It could debounce the requeue operation, and try to requeue the items in the future.
111113
select {
112114
case <-q.ctxRun.Done():
113115
case <-time.After(time.Duration(unhandledItemRequeueDuration.Load())):

0 commit comments

Comments
 (0)