You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mh...@apache.org on 2018/01/03 17:45:28 UTC

asterixdb git commit: [ASTERIXDB-2219][STO] Skip Empty Components Replication

Repository: asterixdb
Updated Branches:
  refs/heads/master 36b543d3b -> 5079b6b7b


[ASTERIXDB-2219][STO] Skip Empty Components Replication

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Skip replication for empty components on flushes
  and merges.

Change-Id: If1453f813dafa2aa6c40039fac1d0aea2f08a4e2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2259
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <ba...@gmail.com>


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

Branch: refs/heads/master
Commit: 5079b6b7b7c3c6c178df5b03a044f9ba65706b22
Parents: 36b543d
Author: Murtadha Hubail <mh...@apache.org>
Authored: Wed Jan 3 16:02:45 2018 +0300
Committer: Murtadha Hubail <mh...@apache.org>
Committed: Wed Jan 3 09:44:51 2018 -0800

----------------------------------------------------------------------
 .../apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5079b6b7/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
index 15ed0ff..b2c48e1 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java
@@ -342,7 +342,7 @@ public class LSMHarness implements ILSMHarness {
                 // newComponent is null if the flush op. was not performed.
                 if (!failedOperation && newComponent != null) {
                     lsmIndex.addDiskComponent(newComponent);
-                    if (replicationEnabled) {
+                    if (replicationEnabled && newComponent != EmptyComponent.INSTANCE) {
                         componentsToBeReplicated.clear();
                         componentsToBeReplicated.add(newComponent);
                         triggerReplication(componentsToBeReplicated, false, opType);
@@ -354,7 +354,7 @@ public class LSMHarness implements ILSMHarness {
                 // newComponent is null if the merge op. was not performed.
                 if (!failedOperation && newComponent != null) {
                     lsmIndex.subsumeMergedComponents(newComponent, ctx.getComponentHolder());
-                    if (replicationEnabled) {
+                    if (replicationEnabled && newComponent != EmptyComponent.INSTANCE) {
                         componentsToBeReplicated.clear();
                         componentsToBeReplicated.add(newComponent);
                         triggerReplication(componentsToBeReplicated, false, opType);