zrepl/client
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
..
status prevent transient zrepl status error: Post "http://unix/status": EOF 2022-06-26 14:39:35 +02:00
configcheck.go Add --skip-cert-check flag to zrepl configcheck to prevent checking cert files 2022-07-08 20:18:41 +02:00
jsonclient.go run golangci-lint and apply suggested fixes 2019-03-27 13:12:26 +01:00
migrate_test.go receiving side: placeholder as simple on|off property 2019-03-20 20:26:30 +01:00
migrate.go Add --skip-cert-check flag to zrepl configcheck to prevent checking cert files 2022-07-08 20:18:41 +02:00
pprof_activity_trace.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
pprof_listen.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
pprof.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
signal.go client/signal: Revert "add signal 'snapshot', rename existing signal 'wakeup' to 'replication'" 2021-03-25 22:26:17 +01:00
stdinserver.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
testcmd.go zrepl test placeholder: fix panic if dataset does not exist 2021-12-18 15:14:33 +01:00
version.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
zfsabstractions_create_step_hold.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
zfsabstractions_create.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
zfsabstractions_list.go fix active child tasks panic with endpoint.ListAbstractionsStreamed 2022-07-17 21:44:03 +02:00
zfsabstractions_release.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
zfsabstractions.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