aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zma...@apache.org
Subject aurora git commit: Add a flag to configure H2 LOCK_TIMEOUT.
Date Mon, 01 Feb 2016 22:48:58 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 166ca416d -> 824e396ab


Add a flag to configure H2 LOCK_TIMEOUT.

Bugs closed: AURORA-1596

Reviewed at https://reviews.apache.org/r/42985/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/824e396a
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/824e396a
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/824e396a

Branch: refs/heads/master
Commit: 824e396ab80874cfea98ef47829279126838a3b2
Parents: 166ca41
Author: Zameer Manji <zmanji@apache.org>
Authored: Mon Feb 1 14:48:51 2016 -0800
Committer: Zameer Manji <zmanji@apache.org>
Committed: Mon Feb 1 14:48:51 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/aurora/scheduler/storage/db/DbModule.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/824e396a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
index a0344f7..6d8fa11 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
@@ -80,6 +80,11 @@ public final class DbModule extends PrivateModule {
   private static final Arg<Amount<Long, Time>> DB_ROW_GC_INTERVAL =
       Arg.create(Amount.of(2L, Time.HOURS));
 
+  // http://h2database.com/html/grammar.html#set_lock_timeout
+  @CmdLine(name = "db_lock_timeout", help = "H2 table lock timeout")
+  private static final Arg<Amount<Long, Time>> H2_LOCK_TIMEOUT =
+      Arg.create(Amount.of(1L, Time.MINUTES));
+
   private static final Set<Class<?>> MAPPER_CLASSES = ImmutableSet.<Class<?>>builder()
       .add(AttributeMapper.class)
       .add(CronJobMapper.class)
@@ -120,6 +125,8 @@ public final class DbModule extends PrivateModule {
         .put("TRACE_LEVEL_FILE", "4")
         // Enable Query Statistics
         .put("QUERY_STATISTICS", "TRUE")
+        // Configure the lock timeout
+        .put("LOCK_TIMEOUT", H2_LOCK_TIMEOUT.get().as(Time.MILLISECONDS).toString())
         .build();
     this.jdbcSchema = dbName + ";" + Joiner.on(";").withKeyValueSeparator("=").join(args);
   }


Mime
View raw message