mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
193abbe6b1
The goroutine that does endTask() for "list-abstractions-streamed-producer" can be preempted after it has closed the out and outErrs channel, but before it calls endTask(). If the parent ("handler") then gets scheduled and and ends itself, it will observe an active child task "list-abstractions-streamed-producer". This is easy to demo by injecting a sleep here: --- a/endpoint/endpoint_zfs_abstraction.go +++ b/endpoint/endpoint_zfs_abstraction.go @@ -575,6 +576,7 @@ func ListAbstractionsStreamed(ctx context.Context, query ListZFSHoldsAndBookmark ctx, endTask := trace.WithTask(ctx, "list-abstractions-streamed-producer") go func() { defer endTask() + defer time.Sleep(10 * time.Second) defer close(out) defer close(outErrs) fixes https://github.com/zrepl/zrepl/issues/607 |
||
---|---|---|
.. | ||
context.go | ||
endpoint_abstractions_cache.go | ||
endpoint_guarantees.go | ||
endpoint_metrics.go | ||
endpoint_zfs_abstraction_last_received_hold.go | ||
endpoint_zfs_abstraction_replication_cursor.go | ||
endpoint_zfs_abstraction_step_hold.go | ||
endpoint_zfs_abstraction_test.go | ||
endpoint_zfs_abstraction.go | ||
endpoint_zfs_helpers_repr_test.go | ||
endpoint_zfs_helpers_repr.go | ||
endpoint_zfs_helpers_types.go | ||
endpoint.go | ||
jobid.go | ||
placeholdercreationencryptionproperty_enumer.go | ||
replicationguaranteekind_enumer.go |