asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject asterixdb git commit: [NO ISSUE][OTH] trace releases of memory components
Date Mon, 02 Oct 2017 17:09:05 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master b7421ff3d -> ef4e6a3a9


[NO ISSUE][OTH] trace releases of memory components

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

details:
- Add traces for releases of memory components.

Change-Id: Ie307cadd46bfdf423bab1e0e09f8ba2775b61477
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2044
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Xikui Wang <xkkwww@gmail.com>


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

Branch: refs/heads/master
Commit: ef4e6a3a9f7dfa3d20bf0510b840e1a329be3768
Parents: b7421ff
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Sun Oct 1 19:03:01 2017 -0700
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Mon Oct 2 10:08:52 2017 -0700

----------------------------------------------------------------------
 .../storage/am/lsm/common/impls/AbstractLSMIndex.java     |  2 +-
 .../storage/am/lsm/common/impls/ExternalIndexHarness.java |  2 +-
 .../hyracks/storage/am/lsm/common/impls/LSMHarness.java   | 10 ++++++++--
 3 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ef4e6a3a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
index beed6b4..fe6d20f 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
@@ -115,7 +115,7 @@ public abstract class AbstractLSMIndex implements ILSMIndex {
         this.inactiveDiskComponents = new LinkedList<>();
         this.durable = durable;
         this.tracer = tracer;
-        lsmHarness = new LSMHarness(this, mergePolicy, opTracker, diskBufferCache.isReplicationEnabled());
+        lsmHarness = new LSMHarness(this, mergePolicy, opTracker, diskBufferCache.isReplicationEnabled(),
tracer);
         isActive = false;
         diskComponents = new ArrayList<>();
         memoryComponents = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ef4e6a3a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ExternalIndexHarness.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ExternalIndexHarness.java
b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ExternalIndexHarness.java
index ee67fbe..e9b2058 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ExternalIndexHarness.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/ExternalIndexHarness.java
@@ -45,7 +45,7 @@ public class ExternalIndexHarness extends LSMHarness {
 
     public ExternalIndexHarness(ILSMIndex lsmIndex, ILSMMergePolicy mergePolicy, ILSMOperationTracker
opTracker,
             boolean replicationEnabled) {
-        super(lsmIndex, mergePolicy, opTracker, replicationEnabled);
+        super(lsmIndex, mergePolicy, opTracker, replicationEnabled, null);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ef4e6a3a/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 35c93ba..1fc702c 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
@@ -53,6 +53,8 @@ import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTracker;
 import org.apache.hyracks.storage.am.lsm.common.api.LSMOperationType;
 import org.apache.hyracks.storage.common.IIndexCursor;
 import org.apache.hyracks.storage.common.ISearchPredicate;
+import org.apache.hyracks.util.trace.Tracer;
+import org.apache.hyracks.util.trace.Tracer.Scope;
 
 public class LSMHarness implements ILSMHarness {
     private static final Logger LOGGER = Logger.getLogger(LSMHarness.class.getName());
@@ -63,12 +65,14 @@ public class LSMHarness implements ILSMHarness {
     protected final AtomicBoolean fullMergeIsRequested;
     protected final boolean replicationEnabled;
     protected List<ILSMDiskComponent> componentsToBeReplicated;
+    protected Tracer tracer;
 
     public LSMHarness(ILSMIndex lsmIndex, ILSMMergePolicy mergePolicy, ILSMOperationTracker
opTracker,
-            boolean replicationEnabled) {
+            boolean replicationEnabled, Tracer tracer) {
         this.lsmIndex = lsmIndex;
         this.opTracker = opTracker;
         this.mergePolicy = mergePolicy;
+        this.tracer = tracer;
         fullMergeIsRequested = new AtomicBoolean();
         //only durable indexes are replicated
         this.replicationEnabled = replicationEnabled && lsmIndex.isDurable();
@@ -217,7 +221,6 @@ public class LSMHarness implements ILSMHarness {
         try {
             synchronized (opTracker) {
                 try {
-
                     /**
                      * [flow control]
                      * If merge operations are lagged according to the merge policy,
@@ -247,6 +250,9 @@ public class LSMHarness implements ILSMHarness {
                                     }
                                     break;
                                 case INACTIVE:
+                                    if (tracer != null && tracer.isEnabled()) {
+                                        tracer.instant(lsmIndex.toString(), "release-memory-component",
Scope.p, null);
+                                    }
                                     ((AbstractLSMMemoryComponent) c).reset();
                                     // Notify all waiting threads whenever the mutable component's
has change to inactive. This is important because
                                     // even though we switched the mutable components, it
is possible that the component that we just switched


Mime
View raw message