zrepl/endpoint
Christian Schwarz 193abbe6b1 fix active child tasks panic with endpoint.ListAbstractionsStreamed
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
2022-07-17 21:44:03 +02:00
..
context.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
endpoint_abstractions_cache.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
endpoint_guarantees.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
endpoint_metrics.go replication + endpoint: replication guarantees: guarantee_{resumability,incremental,nothing} 2020-07-26 20:32:35 +02:00
endpoint_zfs_abstraction_last_received_hold.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
endpoint_zfs_abstraction_replication_cursor.go Reformat all files with make format. 2020-08-31 23:57:45 +02:00
endpoint_zfs_abstraction_step_hold.go replication + endpoint: replication guarantees: guarantee_{resumability,incremental,nothing} 2020-07-26 20:32:35 +02:00
endpoint_zfs_abstraction_test.go zfs.NilBool: document its purpose and move it to its own package 'nodefault' 2021-02-20 17:04:57 +01:00
endpoint_zfs_abstraction.go fix active child tasks panic with endpoint.ListAbstractionsStreamed 2022-07-17 21:44:03 +02:00
endpoint_zfs_helpers_repr_test.go endpoint: refactor, fix stale holds on initial replication failure, zfs-abstractions subcmd, more efficient ZFS queries 2020-04-18 12:26:03 +02:00
endpoint_zfs_helpers_repr.go endpoint: refactor, fix stale holds on initial replication failure, zfs-abstractions subcmd, more efficient ZFS queries 2020-04-18 12:26:03 +02:00
endpoint_zfs_helpers_types.go endpoint: refactor, fix stale holds on initial replication failure, zfs-abstractions subcmd, more efficient ZFS queries 2020-04-18 12:26:03 +02:00
endpoint.go fix encrypt-on-receive with placeholders 2021-12-18 15:12:47 +01:00
jobid.go replication + endpoint: replication guarantees: guarantee_{resumability,incremental,nothing} 2020-07-26 20:32:35 +02:00
placeholdercreationencryptionproperty_enumer.go fix encrypt-on-receive with placeholders 2021-12-18 15:12:47 +01:00
replicationguaranteekind_enumer.go replication + endpoint: replication guarantees: guarantee_{resumability,incremental,nothing} 2020-07-26 20:32:35 +02:00