Skip to content

Commit 885b2d8

Browse files
committed
tweaking default opt_str config to include compression, and linearizable reads
1 parent be0c64a commit 885b2d8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/picoded/dstack/mongodb/MongoDBStack.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ public static String getFullConnectionURL(GenericConvertMap<String, Object> conf
5555
String host = config.getString("host", "localhost");
5656
int port = config.getInt("port", 27017);
5757
String opts = config.getString("opt_str",
58-
"r=majority&w=majority&retryWrites=true&maxPoolSize=50");
58+
"w=majority&retryWrites=true&retryReads=true&"+
59+
"maxPoolSize=10&compressors=zstd&"+
60+
"readPreference=nearest&readConcernLevel=linearizable");
5961

6062
// In the future we may want to support opt_map
61-
// this should still support the default read/write "majority" concern.
6263
// GenericConvertMap<String,Object> optMap = config.getGenericConvertStringMap("opt_map", "{}");
6364

6465
// Lets build the auth str

0 commit comments

Comments
 (0)