Files
neon/pageserver/src
Joonas Koivunen a6dffb6ef9 fix: stop using Arc::ptr_eq with dyn Trait (#3558)
This changes the way we compare `Arc<dyn PersistentLayer>` in Timeline's
`LayerMap` not to use `Arc::ptr_eq` which has been witnessed in
development of #3557 to yield wrong results. It gives wrong results
because it compares fat pointers, which are `(object, vtable)` tuples
for `dyn Trait` and there are no guarantees that the `vtable`s are
unique. As in there were multiple vtables for `RemoteLayer` which is why
the comparison failed in #3557.

This is a known issue in rust, clippy warns against it and rust std
might be moving to the solution which has been reproduced on this PR:
compare only object pointers by "casting out" the vtable pointer.
2023-02-08 12:25:25 +00:00
..
2023-01-25 14:53:30 +01:00
2023-01-25 14:53:30 +01:00
2023-01-25 14:53:30 +01:00
2023-01-27 12:23:17 +01:00
2023-01-25 14:53:30 +01:00
2022-11-10 16:43:04 -05:00
2023-01-25 14:53:30 +01:00
2022-12-21 19:16:39 +01:00