Files
scylladb/db/view
Michał Jadwiszczak 7dfb76f9a7 db/view/view_building_worker: wrap shared_sstable in foreign_ptr
When a staging sstable is registered to view building worker,
it needs to make a round trip from its original shard to shard 0
(in order to create a view building task) and back (to be eventually
processed).
Until now this was done using plain `sstables::shared_sstable`
(= `lw_shared_ptr`) which is not safe to be moved between shards.

This patch fixes this by wrapping the pointer in `foreign_ptr` and
obtains necessary informations (owner shard, last token) on the original
shard (instead of on shard0).
Then all of those objects are put into freshly introduced structure
`staging_sstable_task_info`, which can be safely moved between shards.

Fixes scylladb/scylladb#25859
2025-09-18 02:57:36 +02:00
..