Generated 3 million keys in ozone, and run listBucket command to get a list of buckets under a volume,
this call spent over 15 seconds to finish. The problem was caused by the inflexible structure of KSM DB. Right now ksm.db stores keys like following
keys are sorted in nature order so when we do list buckets under a volume e.g /v1, we need to seek to /v1 point and start to iterate and filter keys, this ends up with scanning all keys under volume /v1. The problem with this design is we don't have an efficient approach to locate all buckets without scanning the keys.