imay closed pull request #519: Change the default bdbje sync policy to SYNC URL: https://github.com/apache/incubator-doris/pull/519
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/fe/src/main/java/org/apache/doris/common/Config.java b/fe/src/main/java/org/apache/doris/common/Config.java index 3bddd82e..43135e69 100644 --- a/fe/src/main/java/org/apache/doris/common/Config.java +++ b/fe/src/main/java/org/apache/doris/common/Config.java @@ -118,18 +118,25 @@ @ConfField public static int meta_delay_toleration_second = 300; // 5 min /* * Master FE sync policy of bdbje. + * If you only deploy one Follower FE, set this to 'SYNC'. If you deploy more than 3 Follower FE, + * you can set this and the following 'replica_sync_policy' to WRITE_NO_SYNC. * more info, see: http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/je/Durability.SyncPolicy.html */ - @ConfField public static String master_sync_policy = "WRITE_NO_SYNC"; // SYNC, NO_SYNC, WRITE_NO_SYNC + @ConfField public static String master_sync_policy = "SYNC"; // SYNC, NO_SYNC, WRITE_NO_SYNC /* * Follower FE sync policy of bdbje. */ - @ConfField public static String replica_sync_policy = "WRITE_NO_SYNC"; // SYNC, NO_SYNC, WRITE_NO_SYNC + @ConfField public static String replica_sync_policy = "SYNC"; // SYNC, NO_SYNC, WRITE_NO_SYNC /* * Replica ack policy of bdbje. * more info, see: http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/je/Durability.ReplicaAckPolicy.html */ @ConfField public static String replica_ack_policy = "SIMPLE_MAJORITY"; // ALL, NONE, SIMPLE_MAJORITY + + /* + * the max txn number which bdbje can rollback when trying to rejoin the group + */ + @ConfField public static int txn_rollback_limit = 100; /* * Specified an IP for frontend, instead of the ip get by *InetAddress.getByName*. diff --git a/fe/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java b/fe/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java index a6f863a4..f3ddc1d5 100644 --- a/fe/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java +++ b/fe/src/main/java/org/apache/doris/journal/bdbje/BDBEnvironment.java @@ -105,6 +105,8 @@ public void setup(File envHome, String selfNodeName, String selfNodeHostPort, replicationConfig.setGroupName(PALO_JOURNAL_GROUP); replicationConfig.setConfigParam(ReplicationConfig.ENV_UNKNOWN_STATE_TIMEOUT, "10"); replicationConfig.setMaxClockDelta(Config.max_bdbje_clock_delta_ms, TimeUnit.MILLISECONDS); + replicationConfig.setConfigParam(ReplicationConfig.TXN_ROLLBACK_LIMIT, + String.valueOf(Config.txn_rollback_limit)); if (isElectable) { replicationConfig.setReplicaAckTimeout(2, TimeUnit.SECONDS); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org