Uploaded image for project: 'Spark Connector'
  1. Spark Connector
  2. SPARK-391

Spark connector writeConcern with MAJORITY value not properly supported

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Stream
    • None
    • Hide

      You cannot used named write concerns (eg: MAJORITY, W1, ACKNOWLEDGED) - as you must set the w value as per: https://www.mongodb.com/docs/manual/reference/write-concern/

      1. What would you like to communicate to the user about this feature?

      "majority": Requests acknowledgment that write operations have propagated to the
      calculated majority of the data-bearing voting members (i.e. primary and secondaries with members[n].votes greater than 0).

      <number> : Requests acknowledgment that the write operation has propagated to the specified number of mongod instances.

      <custom write concern name>
      Requests acknowledgment that the write operations have propagated to tagged members that satisfy the custom write concern defined in settings.getLastErrorModes

      Show
      You cannot used named write concerns (eg: MAJORITY, W1, ACKNOWLEDGED) - as you must set the w value as per: https://www.mongodb.com/docs/manual/reference/write-concern/ 1. What would you like to communicate to the user about this feature? "majority": Requests acknowledgment that write operations have propagated to the calculated majority of the data-bearing voting members (i.e. primary and secondaries with members [n] .votes greater than 0). <number> : Requests acknowledgment that the write operation has propagated to the specified number of mongod instances. <custom write concern name> Requests acknowledgment that the write operations have propagated to tagged members that satisfy the custom write concern defined in settings.getLastErrorModes

      Customer reported using writeConcern.w: "MAJORITY" causes the following error.

      > Caused by: com.mongodb.spark.sql.connector.exceptions.ConfigException: writeConcern.w did not contain a valid int, got: MAJORITY

      Reviewing the Spark document for 10.1.0, setting "spark.mongodb.write.writeConcern.w=" you can use the following values.

      • MAJORITY
      • W1W2, or W3
      • ACKNOWLEDGED
      • UNACKNOWLEDGED

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            shawn.hawkins@mongodb.com Shawn Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: