Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1252

Possible LegacyDocument long content transcoding bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • None
    • None
    • None
    • None
    • Encountered with
      java-client 2.4.8
      Server 4.6.1

    Description

      Attached is a simple unit test.

      A document content represents an incremented counter.

      In tests, the document content (Long) is incremented 10 times from 0 to 10.
      With even increments, the document representation is LegacyDocument. The content is cast to long, incremented, and the document is *replace*d
      With odd increments, the document representation is LegacyDocument. The content is cast to long, incremented, and the document is upsert*ed as *JsonLongDocument

      This replacement simplifies a business scenario and in reality should happened only once (to be followed with successive calls to bucket.counter

      Something goes wrong during the 9 increment, the content is correctly read (8) and incremented (9).

      However, during the 10 increment  - bucket.upsert(JsonLongDocument) - the value is reset before increment (testInc method simulate that).

      Also, the value returned by bucket.get is not as expected and differ from the value returned  (testGet method simulate that). 

       

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            dar.ori@gmail.com Ori Dar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty