Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
Untriaged
-
1
-
Unknown
Description
GSI code treats the ns_server metakv.ListAllChildren() API as if it returns only a list of all the keys in a directory, so if GSI also wants the values (tokens), it iterates over the entries returned by ListAllChildren() and calls metakv.Get(entry.Path) to retrieve each one, one by one. However, metakv.ListAllChildren() actually returns all the keys AND all their values, so the additional metakv.Get() calls, which cost about 20ms each, are not needed. The values are in the Value []byte slice fields of the returned entries and just need to be unmarshalled into the correct token type. I have verified this empirically.
This is a follow-on to GSI MB-43285 (metakv performance findings of that are also summarized in ns_server MB-44264).
Attachments
Issue Links
- is a backport of
-
MB-44269 Performance: metakv API misunderstanding in GSI code: ListAllChildren() returns keys AND values
- Closed