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

[Backport MB-36136 to 6.6.2] RestoreIndexMetadata endpoint may timeout with large number of indexes

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      Within the handler forRestoreIndexMetadata, we sequentially issue the CreateIndex request for each index before returning a 200 response code to client (cbrestore or cbbackupmgr):

      http://src.couchbase.org/source/xref/6.0.1/goproj/src/github.com/couchbase/indexing/secondary/manager/request_handler.go#handleRestoreIndexMetadataRequest

      Even though the indexes are restored with deferred builds, these take a reasonable amount of time each, such that for high numbers of indexes this can run for >1 minute before responding.

      In the case of cbrestore (and after MB-36054 in cbbackupmgr too), this leads to the restore timing out.

      Given that we do the validation before starting the index creation, it might be easiest to simply return at this point and do the creation asynchronously; however this obviously changes the nature of what the 200 response means so would require confirmation on the Tools side. Alternatively, some manner of heartbeating or otherwise keeping the connection open could potentially be used.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-43177
          # Subject Branch Project Status CR V

          Activity

            People

              girish.benakappa Girish Benakappa
              amit.kulkarni Amit Kulkarni
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty