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

Json import failed: Input JSON is invalid, expected a JSON list of objects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0.0
    • 5.0.0
    • tools
    • 4.7.0-1231
    • Untriaged
    • Unknown

    Description

      the issue reproduced almost every time when num of docs > 1K

      example with 2K:
      first import generates invalid json
      the second one generates valid json

      Andreis-MacBook-Pro:perfrunner2 andrei$ ./couchbase-server-enterprise_4/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbexport json -c http://172.23.106.87:8091 --username Administrator --password password --format list --output /data/backup/list1.json -b bucket-1 -l LOG_EXPORT1
      Json exported to `/data/backup/list1.json` successfully
      Andreis-MacBook-Pro:perfrunner2 andrei$ ./couchbase-server-enterprise_4/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbexport json -c http://172.23.106.87:8091 --username Administrator --password password --format list --output /data/backup/list2.json -b bucket-1 -l LOG_EXPORT2
      Json exported to `/data/backup/list2.json` successfully
      Andreis-MacBook-Pro:perfrunner2 andrei$ ./couchbase-server-enterprise_4/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbimport json -c http://172.23.106.87:8091 --username Administrator --password password --dataset file:///data/backup/list1.json -b bucket-1 -g "#MONO_INCR#" -l LOG_IMPORT1 --format list -e LOG_IMPORT1_ERROR
      Json import failed: Input JSON is invalid, expected a JSON list of objects
      Andreis-MacBook-Pro:perfrunner2 andrei$ ./couchbase-server-enterprise_4/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbimport json -c http://172.23.106.87:8091 --username Administrator --password password --dataset file:///data/backup/list2.json -b bucket-1 -g "#MONO_INCR#" -l LOG_IMPORT2 --format list -e LOG_IMPORT2_ERROR
      Json `file:///data/backup/list2.json` imported to `http://172.23.106.87:8091` successfully
      

      so, list1.json has some errors in json formatting ( see screenshots)

      on jenkins: http://perf.jenkins.couchbase.com/job/leto/4110/console

      Attachments

        1. 2000_backup_docs.zip
          404 kB
        2. export.json
          1.82 MB
        3. list1.json
          1.83 MB
        4. list2.json
          1.83 MB
        5. LOG_EXPORT1
          241 kB
        6. LOG_EXPORT2
          241 kB
        7. LOG_IMPORT1
          2 kB
        8. LOG_IMPORT2
          1 kB
        9. Screen Shot 2016-10-20 at 18.35.36.png
          Screen Shot 2016-10-20 at 18.35.36.png
          354 kB
        10. Screen Shot 2016-10-20 at 18.36.07.png
          Screen Shot 2016-10-20 at 18.36.07.png
          369 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              andreibaranouski Andrei Baranouski
              andreibaranouski Andrei Baranouski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty