File tree Expand file tree Collapse file tree 2 files changed +2
-31
lines changed Expand file tree Collapse file tree 2 files changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -892,24 +892,16 @@ private BulkWriteError getBulkWriteError(final WriteConcernException writeExcept
892892
893893 // Accommodating GLE representation of write concern errors
894894 private boolean isWriteConcernError (final CommandResult commandResult ) {
895- return commandResult .get ("wtimeout" ) != null || commandResult . get ( "wnote" ) != null || commandResult . get ( "jnote" ) != null ;
895+ return commandResult .get ("wtimeout" ) != null ;
896896 }
897897
898898 private WriteConcernError getWriteConcernError (final CommandResult commandResult ) {
899899 return new WriteConcernError (commandResult .getCode (), getWriteConcernErrorMessage (commandResult ),
900900 getErrorResponseDetails (commandResult ));
901901 }
902902
903- // GLE uses jnote and wnote as alternative ways or reporting write concern errors
904903 private String getWriteConcernErrorMessage (final CommandResult commandResult ) {
905- String errorMessage = commandResult .getString ("jnote" );
906- if (errorMessage == null ) {
907- errorMessage = commandResult .getString ("wnote" );
908- }
909- if (errorMessage == null ) {
910- errorMessage = commandResult .getString ("err" );
911- }
912- return errorMessage ;
904+ return commandResult .getString ("err" );
913905 }
914906
915907 private DBObject getErrorResponseDetails (final DBObject response ) {
Original file line number Diff line number Diff line change @@ -634,27 +634,6 @@ class BulkWriteOperationSpecification extends FunctionalSpecification {
634634 ordered << [true , false ]
635635 }
636636
637- def ' when w > 1 write concern is used on a standalone server without write commands, BulkWriteException is thrown' () {
638- assumeTrue(isStandalone() && ! serverIsAtLeastVersion(2.6 ))
639-
640- given :
641- def operation = collection. initializeUnorderedBulkOperation()
642- operation. insert(new BasicDBObject (' _id' , 1 ))
643- operation. insert(new BasicDBObject (' _id' , 2 ))
644-
645- when :
646- operation. execute(new WriteConcern (2 , 1 ))
647-
648- then :
649- def e = thrown(BulkWriteException )
650- e. writeResult == new AcknowledgedBulkWriteResult (INSERT , 2 , [])
651- e. writeConcernError != null
652- e. writeConcernError. getDetails(). containsField(' wnote' )
653-
654- where :
655- ordered << [true , false ]
656- }
657-
658637 def ' when j write concern is used on a server without journaling or write commands, BulkWriteException is thrown' () {
659638 assumeTrue(! isSharded() && isServerStartedWithJournalingDisabled() && ! serverIsAtLeastVersion(2.6 ))
660639
You can’t perform that action at this time.
0 commit comments