scylladb / scylladb

NoSQL data store using the seastar framework, compatible with Apache Cassandra
http://scylladb.com
GNU Affero General Public License v3.0
13.2k stars 1.25k forks source link

Implement function `commitlog_recover`. #18415

Open libo-sober opened 4 months ago

libo-sober commented 4 months ago

I saw that there is a reserved API interface for Recover a single file. Why hasn't it been implemented? Is it because it's not easy to implement. Now I have this need to implement it. But I encountered some problems when trying to do it. How to instantiate a commitlog_replayer instance? Because there are only commitlog objects in db.

mykaul commented 4 months ago

@elcallio ?

elcallio commented 4 months ago

I have no idea why @amnonh added the API call. My guess is just an almost-1:1 with cassandra. However, this is not an API that should exist or be implemented. First off, where do you even get a segment to replay from? And if you do, it should not be replayed willy-nilly, in an otherwise active node... There are a bunch of assumptions in a normal, startup recovery replay that are not true when started.