Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-44408

[BP MB-44269 6.6.2] - Performance: metakv API misunderstanding in GSI code: ListAllChildren() returns keys AND values

    XMLWordPrintable

Details

    • 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

          Activity

            People

              wayne Wayne Siu
              jeelan.poola Jeelan Poola
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty