Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b45c3ae
move shutdownfns, terminatefns and hammerfns out of separate goroutines
zeripath Apr 30, 2021
105a121
oops windows;
zeripath Apr 30, 2021
7976e99
comment changes
zeripath Apr 30, 2021
8815d90
Update manager_windows.go
zeripath Apr 30, 2021
159c3a1
The LevelDB queues can actually wait on empty instead of polling
zeripath May 1, 2021
dd18577
Merge branch 'master' into wait-on-empty
zeripath May 1, 2021
86b597f
Merge branch 'master' into wait-on-empty
zeripath May 2, 2021
12f2f45
Merge branch 'wait-on-empty' of github.com:zeripath/gitea into wait-o…
zeripath May 2, 2021
ec99e10
Shutdown the shadow level queue once it is empty
zeripath May 2, 2021
0c107aa
Remove bytefifo additional goroutine for readToChan as it can just be…
zeripath May 2, 2021
c41b52a
Remove additional removeWorkers goroutine for workers
zeripath May 2, 2021
5e35339
simplify zero boost
zeripath May 2, 2021
f546070
Merge branch 'graceful-context' into wait-on-empty
zeripath May 3, 2021
eda962d
Simplify the AtShutdown and AtTerminate functions and add Channel Flu…
zeripath May 3, 2021
5fc1c80
add logging
zeripath May 3, 2021
5ea5882
Add shutdown flusher to CUQ
zeripath May 3, 2021
fb4b1c9
move persistable channel shutdown stuff to Shutdown Fn
zeripath May 3, 2021
b0bbd0d
Ensure that UPCQ has the correct config
zeripath May 3, 2021
803dc56
Merge branch 'master' into wait-on-empty
zeripath May 3, 2021
6b95a89
placate lint
zeripath May 3, 2021
0878aa3
Merge branch 'master' into wait-on-empty
zeripath May 4, 2021
293839c
Merge branch 'main' into wait-on-empty
zeripath May 4, 2021
dae99ea
pass down context
zeripath May 4, 2021
a58b7ed
Merge branch 'main' into wait-on-empty
6543 May 5, 2021
0f9aea8
fix test
zeripath May 5, 2021
7b18173
Merge branch 'wait-on-empty' of github.com:zeripath/gitea into wait-o…
zeripath May 5, 2021
795000b
handle shutdown during the flushing
zeripath May 5, 2021
a5809e9
reduce risk of race between zeroBoost and addWorkers
zeripath May 7, 2021
b14af1f
update comment as per 6543
zeripath May 8, 2021
a9872d2
Merge branch 'main' into wait-on-empty
zeripath May 8, 2021
24ca154
prevent double shutdown
zeripath May 8, 2021
e876fec
rename contexts and their cancel fns
zeripath May 8, 2021
6a60b2a
few missed commits
zeripath May 8, 2021
a5b2de5
Merge remote-tracking branch 'origin/main' into wait-on-empty
zeripath May 8, 2021
cff032f
fix-windows
zeripath May 8, 2021
68ffb7a
Merge branch 'main' into wait-on-empty
zeripath May 9, 2021
3bbfdb6
Merge branch 'main' into wait-on-empty
zeripath May 10, 2021
cbd2c3e
Merge branch 'main' into wait-on-empty
lafriks May 15, 2021
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
Prev Previous commit
Next Next commit
handle shutdown during the flushing
Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed May 5, 2021
commit 795000b26a9df9b4ee251757b6f57e56745b2e66
7 changes: 6 additions & 1 deletion modules/queue/queue_disk_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ func (q *PersistableChannelQueue) Run(atShutdown, atTerminate func(func())) {
go func() {
for !q.IsEmpty() {
_ = q.internal.Flush(0)
<-time.After(100 * time.Millisecond)
select {
case <-time.After(100 * time.Millisecond):
case <-q.internal.(*LevelQueue).shutdownCtx.Done():
log.Warn("LevelQueue: %s shut down before completely flushed", q.internal.(*LevelQueue).Name())
return
}
}
log.Debug("LevelQueue: %s flushed so shutting down", q.internal.(*LevelQueue).Name())
q.internal.(*LevelQueue).Shutdown()
Expand Down