AlexanderMihail / seastar_db

A key-value database engine with REST interface
http://seastar.io
Apache License 2.0
0 stars 0 forks source link

Read the key-files with a generator coroutine. #8

Closed AlexanderMihail closed 3 months ago

AlexanderMihail commented 3 months ago

Is it worth it? Pros? Cons?

AlexanderMihail commented 3 months ago

Added the index_revolver coroutine:

https://github.com/AlexanderMihail/seastar_db/blob/4df6de30988b197b107c4857186da4c7276a4994/demos/db_demo.cc#L387

The index revolver continuously loops over the index returning sequential entries, including an end marker that contains the rous count. Table::list is using it to build a list of all keys in a table:

https://github.com/AlexanderMihail/seastar_db/blob/4df6de30988b197b107c4857186da4c7276a4994/demos/db_demo.cc#L433-L456