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

Subdoc mutation operations log DOCUMENT_MODIFY audit event twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • 6.6.1
    • memcached
    • None
    • Triaged
    • 1
    • No

    Description

      When performing subdoc api operations, a subdoc mutation records multiple audit events for a single mutation - for example using code:

      *Case 1 : Update using sub document API**
      public static void updateUsingSubDocApi() {
          String empDocumentId = "sample_1";
          Duration duration = Duration.ofDays(2);
          List<MutateInSpec> specs = new ArrayList<>();
          specs.add(MutateInSpec.replace("name", "update_2_name"));
          MutationResult mutateInResult = bucket.defaultCollection().mutateIn(empDocumentId, specs,
                  MutateInOptions.mutateInOptions().expiry(duration));
          System.out.println(" data : " + mutateInResult);
      }
      

      and then enabled audit logging for document modifications, we see that there is two entries in the audit log for a single subdoc mutation  Then in audit.log, we see two entries with timestamps  almost at the same time

      {"bucket":"default","description":"Document was modified","id":20490,"key":"<ud>sample_1</ud>","local":{"ip":"172.17.0.2","port":11210},"name":"document modify","real_userid":{"domain":"local","user":"Administrator"},"remote":{"ip":"172.17.0.1","port":57948},"timestamp":"2021-05-10T18:25:42.601491Z"}
      {"bucket":"default","description":"Document was modified","id":20490,"key":"<ud>sample_1</ud>","local":{"ip":"172.17.0.2","port":11210},"name":"document modify","real_userid":{"domain":"local","user":"Administrator"},"remote":{"ip":"172.17.0.1","port":57948},"timestamp":"2021-05-10T18:25:42.601600Z"}
      

      Attachments

        Issue Links

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

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              drigby Dave Rigby (Inactive)
              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