Create utility to allow editing of ydb directory file

Description

Develop a new tool to allow viewing, adding and deleting of entries within the ydb directory file. Maybe also add an audit feature that reconciles the directory entries against the actual files on disk and report any discrepancies.

Maybe call it something tokudiredit. I can imagine some options like:
--attach dname iname // adds an entry that maps dname to the real file iname, file must exist
--move dname_old dname_new // move/renames dname
--remove dname // removes the entry and file specified by dname
--detach dname // removes only the entry dname but leaves the file intact
--list // lists all mappings
--reconcile // compare mappings to actual files and report any discrepancies

It will likely either need to use the toku_* functions directly or will need extension to the YDB API.

For full safety, I believe that the tool should force a checkpoint both before any changes and after any changes.

Environment

None

Status

Assignee

Vladislav Lesin

Reporter

George Lorch

Labels

None

External issue ID

None

Freshdesk Tickets

None

Priority

Major
Configure