You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/11/11 16:51:41 UTC

[49/50] [abbrv] usergrid git commit: set short GC grace period to mop up tombstones quickly as there will be lots of deletes in the queue message tables

set short GC grace period to mop up tombstones quickly as there will be lots of deletes in the queue message tables


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

Branch: refs/heads/master
Commit: ab26fa5265c03492cf69662ce6c7a6d11aee8775
Parents: b405ce8
Author: Dave Johnson <sn...@apache.org>
Authored: Thu Nov 10 12:34:04 2016 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Thu Nov 10 12:34:04 2016 -0500

----------------------------------------------------------------------
 .../impl/QueueMessageSerializationImpl.java       | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/ab26fa52/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queuemessages/impl/QueueMessageSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queuemessages/impl/QueueMessageSerializationImpl.java b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queuemessages/impl/QueueMessageSerializationImpl.java
index fb49825..cb1f476 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queuemessages/impl/QueueMessageSerializationImpl.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/serialization/queuemessages/impl/QueueMessageSerializationImpl.java
@@ -89,7 +89,14 @@ public class QueueMessageSerializationImpl implements QueueMessageSerialization
                 "queued_at        bigint, " +
                 "inflight_at      bigint, " +
                 "PRIMARY KEY ((queue_name, region, shard_id), queue_message_id ) " +
-                ") WITH CLUSTERING ORDER BY (queue_message_id ASC); ";
+                ") WITH CLUSTERING ORDER BY (queue_message_id ASC) AND " +
+                    "gc_grace_seconds = 60 AND " +
+                    "compaction = {'class': " + "'LeveledCompactionStrategy', " +
+                        "'sstable_size_in_mb': 5, " +
+                        "'tombstone_compaction_interval': 60, " +
+                        "'tombstone_threshold': 0.05, " +
+                        "'unchecked_tombstone_compaction': true" +
+                    "};";
 
     static final String MESSAGES_INFLIGHT =
         "CREATE TABLE IF NOT EXISTS messages_inflight ( " +
@@ -101,7 +108,14 @@ public class QueueMessageSerializationImpl implements QueueMessageSerialization
                 "queued_at        bigint, " +
                 "inflight_at      bigint, " +
                 "PRIMARY KEY ((queue_name, region, shard_id), queue_message_id ) " +
-                ") WITH CLUSTERING ORDER BY (queue_message_id ASC); ";
+                ") WITH CLUSTERING ORDER BY (queue_message_id ASC) AND " +
+                    "gc_grace_seconds = 60 AND " +
+                        "compaction = {'class': " + "'LeveledCompactionStrategy', " +
+                        "'sstable_size_in_mb': 5, " +
+                        "'tombstone_compaction_interval': 60, " +
+                        "'tombstone_threshold': 0.05, " +
+                        "'unchecked_tombstone_compaction': true" +
+                    "};";
 
     static final String MESSAGE_DATA =
         "CREATE TABLE IF NOT EXISTS message_data ( " +