bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

[improve] Add more information for the /api/v1/bookie/list_disk_file API

Open crossoverJie opened this issue 1 year ago • 3 comments

FEATURE REQUEST

Currently:

curl http://localhost:8000/api/v1/bookie/list_disk_file/
{
  "index files" : "",
  "journal files" : "xx.txn\t1213.txn\t",
  "entrylog files" : "66.log\t68.log\t"
}

At the moment, we only get the file name, and I hope we can get more information through this interface; for example, the time of creation, the size of the file, like this:

{
  "entrylog files" : [
    {
      "66.log":{
        "size":1024,
        "creationTime":"1970-01-01T00:00:00Z"
      }
    },
    {
      "67.log":{
        "size":1024,
        "creationTime":"1970-01-01T00:00:00Z"
      }
    }
  ] 
}

This information already exists.

But that affects the return structure, and it's a break change.

If we can't modify this interface directly, maybe we can consider adding a new API?

crossoverJie avatar Jan 15 '24 16:01 crossoverJie

The compatibility for HTTP API is import, new API is required.

hezhangjian avatar Apr 23 '24 00:04 hezhangjian

If necessary, please assign it to me.

crossoverJie avatar Apr 23 '24 01:04 crossoverJie

@crossoverJie I think you can open a discuss in mail list first. Let's discuss if these information should be provided by bookkeeper. :)

hezhangjian avatar Apr 23 '24 02:04 hezhangjian