Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4910

Retry debug log message is logged twice

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.10.0
    • Affects Version/s: None
    • Component/s: Logging
    • None
    • Fully Compatible
    • Needed
    • Hide

      We may mention in What's new that we no longer duplicate log messages about retries.

      Show
      We may mention in What's new that we no longer duplicate log messages about retries.

      Running any of the retryable reads tests with operation debug logging enabled yields output like this:

      23:01:28.857 [Test worker] DEBUG org.mongodb.driver.operation - Retrying the operation aggregate due to the error "com.mongodb.MongoNotPrimaryException: Command failed with error 10107 (NotWritablePrimary): 'Failing command via 'failCommand' failpoint' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "Failing command via 'failCommand' failpoint", "code": 10107, "codeName": "NotWritablePrimary"}"; attempt #2
      23:01:28.857 [Test worker] DEBUG org.mongodb.driver.operation - Retrying the operation aggregate due to the error "com.mongodb.MongoNotPrimaryException: Command failed with error 10107 (NotWritablePrimary): 'Failing command via 'failCommand' failpoint' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "Failing command via 'failCommand' failpoint", "code": 10107, "codeName": "NotWritablePrimary"}"; attempt #2
      

      It should only be logged once. Not sure if the same is true for retryable writes, but it likely is.

            Assignee:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: