Commit 89b42dd
committed
bug redis: disconnect slots on stop in topology holder
`ClusterTopologyHolder::Stop()` was not disconnecting the slots, resulting in new events apearing after the `Stop()`:
```
/home/runner/work/userver/userver/redis/src/storages/redis/impl/cluster_sentinel_impl.cpp:884:13: runtime error: member access within address 0x51100001e040 which does not point to an object of type 'userver_ns::storages::redis::impl::ClusterSentinelImpl'
0x51100001e040: note: object has invalid vptr
04 00 00 00 fb 42 00 00 03 00 00 00 d0 7d 01 00 30 51 00 00 80 39 06 00 60 51 00 00 00 00 00 00
^~~~~~~
invalid vptr
#0 0x5561b8eb5ae5 in userver_ns::v1::storages::redis::impl::ClusterSentinelImpl::Init()::$_0::operator()(std::string, userver_ns::v1::storages::redis::RedisState) const /userver/redis/src/storages/redis/impl/cluster_sentinel_impl.cpp:884:13
```
Tests: протестировано CI
commit_hash:52161d57a664620907e07767dcd8525d75081b4c1 parent 1e83538 commit 89b42dd
2 files changed
Lines changed: 7 additions & 9 deletions
File tree
- redis
- functional_tests/cluster_auto_topology_pubsub/tests
- src/storages/redis/impl
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 5 | + | |
| 6 | + | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
92 | | - | |
93 | | - | |
| 90 | + | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
| |||
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
328 | | - | |
329 | | - | |
| 325 | + | |
330 | 326 | | |
331 | 327 | | |
332 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | | - | |
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| |||
0 commit comments