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

Loading documents via console Documents tab hangs Chrome

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0-Beta1
    • Fix Version/s: 7.0.0
    • Component/s: UI
    • Labels:
      None
    • Triage:
      Untriaged
    • Operating System:
      Windows 64-bit
    • Story Points:
      1
    • Is this a Regression?:
      Unknown

      Description

      I have 30 documents, each ~180k.

      If I try to fetch more than ~5 such documents via the Documents tab, (10 is the default in chrome) chrome hangs.

      I can retrieve ALL 30 documents from the Query tab in around ~50ms with no problem whatsoever, using this simple query:

      SELECT dev.* FROM dev WHERE type='form'

      Only the Documents tab fails. 

      I wonder if this has something to do with the query that the Documents tab generates on my behalf:

      `select meta().id from `dev`.`_default`.`_default` data where type='form' order by meta().id limit 10 offset 0`

      I'm not using a 'scope' or a 'collection'. Nor do I want to.

      These documents aren't very big.  I have 18GB of memory assigned to the bucket with only 118MB in use. I'm retrieving documents where type='form'. I have a GSI on 'type'.

      Furthermore, because the console automatically caches the current search in the 'documents' tab, as soon as I've accidentally performed a query that will melt chrome (e.g. fetching 10 or more of said documents), the console caches the result and I can no longer EVER open the console to the documents tab again, because it will re-crash, then re-crash, then re-crash. The ONLY way I can recover is to manually clear chrome browsing data.

      At the very least, I would expect couchbase to attempt to detect a previous hang and clear the current document search that caused it, so that you have some hope of returning to the console again.

        Attachments

        1. document.json
          87 kB
        2. documents.png
          documents.png
          28 kB
        3. hang.png
          hang.png
          5 kB
        4. query.png
          query.png
          19 kB
        5. Screenshot 2021-04-21 at 9.28.19 PM.png
          Screenshot 2021-04-21 at 9.28.19 PM.png
          251 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          eben Eben Haber added a comment -

          Robert Mirabelle - would it be possible for you send me the documents so I could load them and debug?

          When the browser gets bogged down like that, it's a real problem to detect or react to, so prevention is the best option.

          Show
          eben Eben Haber added a comment - Robert Mirabelle - would it be possible for you send me the documents so I could load them and debug? When the browser gets bogged down like that, it's a real problem to detect or react to, so prevention is the best option.
          Hide
          eben Eben Haber added a comment -

          Robert Mirabelle Can you tell me if your 180kb documents have many small fields, or a smaller number of large fields? I'd like to try to reproduce the problem on my own system.

          Show
          eben Eben Haber added a comment - Robert Mirabelle Can you tell me if your 180kb documents have many small fields, or a smaller number of large fields? I'd like to try to reproduce the problem on my own system.
          Hide
          rmirabelle Robert Mirabelle added a comment -

          document.json

           

          Here's an example.  It's many small fields, with hierarchical/nested structure

          Show
          rmirabelle Robert Mirabelle added a comment - document.json   Here's an example.  It's many small fields, with hierarchical/nested structure
          Hide
          eben Eben Haber added a comment -

          Thank you Robert Mirabelle! That sample document was a big help.

          FYI, the Documents view has a "Field Editing" mode, which provides a separate HTML input field for each JSON field in the document. Your documents have > 2500 individual fields, and rendering that many fields was causing the browser to get bogged down. I had some heuristics to limit what was displayed, but none of the heuristics detected documents like yours.

          I have a fix that effectively disables the "Field Editing" mode in cases where too many fields are present for the browser to render quickly. You can still edit the document in the dialog box, and performance will be much faster.

          Show
          eben Eben Haber added a comment - Thank you Robert Mirabelle ! That sample document was a big help. FYI, the Documents view has a "Field Editing" mode, which provides a separate HTML input field for each JSON field in the document. Your documents have > 2500 individual fields, and rendering that many fields was causing the browser to get bogged down. I had some heuristics to limit what was displayed, but none of the heuristics detected documents like yours. I have a fix that effectively disables the "Field Editing" mode in cases where too many fields are present for the browser to render quickly. You can still edit the document in the dialog box, and performance will be much faster.
          Hide
          eben Eben Haber added a comment -

          I just merged a fix for this.

          Show
          eben Eben Haber added a comment - I just merged a fix for this.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-7.0.0-4989 contains query-ui commit c36d5f6 with commit message:
          MB-45739 - Documents view gets bogged down with large/complex documents

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-4989 contains query-ui commit c36d5f6 with commit message: MB-45739 - Documents view gets bogged down with large/complex documents
          Hide
          deepika.verma Deepika Verma added a comment -

          Verified on 4993

          Imported attached document.

          Navigated to document page, with enable field editing document observed warning as "Too many fields in result set for field editing. Limit result size or click ID to edit document."

          Document is editable for doc id link.

          And no server not hang for documents.

          Show
          deepika.verma Deepika Verma added a comment - Verified on 4993 Imported attached document. Navigated to document page, with enable field editing document observed warning as "Too many fields in result set for field editing. Limit result size or click ID to edit document." Document is editable for doc id link. And no server not hang for documents.

            People

            Assignee:
            eben Eben Haber
            Reporter:
            rmirabelle Robert Mirabelle
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty