Benny Halevy
9ba960a388
utils: phased_barrier::operation do not leak gate entry when reassigned
...
utils::phased_barrier holds a `lw_shared_ptr<gate>` that is
typically `enter()`ed in `phased_barrier::start()`,
and left when the operation is destroyed in `~operation`.
Currently, the operation move-assign implementation is the
default one that just moves the lw_shared gate ptr from the
other operation into this one, without calling `_gate->leave()` first.
This change first destroys *this when move-assigned (if not self)
to call _gate->leave() if engaged, before reassigning the
gate with the other operation::_gate.
A unit test that reproduces the issue before this change
and passes with the fix was added to serialized_action_test.
Fixes #8613
Test: unit(dev), serialized_action_test(debug)
Signed-off-by: Benny Halevy <bhalevy@scylladb.com >
Message-Id: <20210510120703.1520328-1-bhalevy@scylladb.com >
2021-05-11 18:39:10 +03:00
..
2021-01-13 11:07:29 +02:00
2021-04-22 15:59:13 +02:00
2021-04-12 16:01:04 +02:00
2021-05-10 12:39:41 +02:00
2021-04-20 21:23:00 +03:00
2021-04-25 11:35:07 +03:00
2021-04-01 12:56:08 +03:00
2021-03-10 19:54:12 +02:00
2021-02-02 09:30:30 +03:00
2020-09-21 16:32:53 +03:00
2021-02-17 13:24:40 +01:00
2021-05-04 12:33:15 +02:00
2020-11-02 18:02:01 +02:00
2021-02-01 19:32:07 +02:00
2020-10-15 19:25:24 +03:00
2021-04-25 11:35:07 +03:00
2021-01-08 14:16:08 +01:00
2020-11-12 12:36:16 +01:00
2021-01-13 11:07:29 +02:00
2021-02-16 23:43:07 +01:00
2021-01-13 11:07:29 +02:00
2020-10-19 15:40:55 -04:00
2021-02-25 17:20:27 +01:00
2021-05-10 11:45:09 +02:00
2021-05-05 13:30:42 +03:00
2020-10-30 08:06:04 +02:00
2020-11-12 12:36:13 +01:00
2021-02-25 17:20:27 +01:00
2021-04-25 11:35:07 +03:00
2021-01-13 11:07:29 +02:00
2021-04-25 11:25:47 +03:00
2021-04-29 22:47:13 +03:00
2021-01-13 16:41:34 +03:00
2021-01-15 18:28:24 +01:00
2020-12-15 16:03:18 +03:00
2021-02-25 17:20:27 +01:00
2021-01-13 11:07:29 +02:00
2021-01-08 14:16:08 +01:00
2021-02-25 17:20:27 +01:00
2021-01-13 11:07:29 +02:00
2021-03-15 13:54:49 +02:00
2021-04-01 10:39:42 +02:00
2021-04-25 11:35:07 +03:00
2021-03-26 14:22:43 +02:00
2021-04-29 11:45:53 +03:00
2021-04-25 11:35:07 +03:00
2021-04-25 11:35:07 +03:00
2021-05-06 08:59:47 +03:00
2021-04-25 11:35:07 +03:00
2021-04-25 11:35:07 +03:00
2021-04-09 12:18:29 +03:00
2021-05-05 18:36:48 +03:00
2021-04-26 15:56:56 +03:00
2021-02-25 17:20:27 +01:00
2021-02-15 20:27:00 +03:00
2021-03-26 20:22:44 +03:00
2021-05-02 16:39:54 +03:00
2020-12-28 18:26:48 +02:00
2021-05-10 18:06:30 +03:00
2021-02-25 17:20:27 +01:00
2021-04-23 17:13:24 +03:00
2021-04-25 11:35:07 +03:00
2021-05-10 10:10:38 +02:00
2021-01-27 17:38:17 +02:00
2021-02-25 17:20:27 +01:00
2021-05-11 18:39:10 +03:00
2021-01-13 16:41:34 +03:00
2021-04-25 11:35:07 +03:00
2020-09-23 20:55:12 +03:00
2021-05-09 11:09:54 +03:00
2021-02-01 16:45:52 +02:00
2021-04-18 14:03:17 +03:00
2021-04-25 11:35:07 +03:00
2020-09-23 20:55:13 +03:00
2021-03-18 11:15:59 +02:00
2021-04-25 11:35:07 +03:00
2021-03-18 11:47:49 -03:00
2021-03-10 21:25:43 -05:00
2020-12-22 10:35:15 +02:00
2021-05-06 08:59:47 +03:00
2021-03-21 09:30:43 +02:00
2021-03-18 12:40:05 +02:00
2021-04-12 16:44:07 +03:00
2021-04-01 10:42:07 +02:00
2020-11-02 16:47:32 +02:00
2021-02-02 13:03:39 +02:00
2021-04-20 21:23:00 +03:00
2020-10-21 11:14:44 +03:00
2021-04-06 17:12:54 +03:00
2021-04-25 11:35:07 +03:00
2021-05-11 18:39:10 +03:00