Luo Chen has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2015

Change subject: [ASTERIXDB-2090] Fix componentIds for bulk load
......................................................................

[ASTERIXDB-2090] Fix componentIds for bulk load

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

Details:
Currently we use LSN as component Ids during the flush time. However,
bulk loaded components receive no component Ids because of no
transactions on them. This patch is a temp fix for this bug by simply
giving bulk loaded components with id 0. This is correct since
currently we only allow load an empty dataset.

An alternative (and better) approach is to use the timestamp instead of
LSNs as component Ids. This needs some discussions, and might be
implemented later.

Change-Id: I3d85c1a0a2e9f04bac1c56113987aa48e1beafe2
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/15/2015/1

diff --git 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
index f357aea..5806437 100644
--- 
a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
+++ 
b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/ioopcallbacks/AbstractLSMIOOperationCallback.java
@@ -20,7 +20,6 @@
 package org.apache.asterix.common.ioopcallbacks;
 
 import java.util.List;
-import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -117,10 +116,6 @@
             //if oldComponents == null, then getComponentLSN would treat it as 
a flush operation,
             //and return the LSN for the flushed component
             long id = getComponentLSN(null);
-            if (id == 0) {
-                logger.log(Level.WARNING, "Flushing a memory component without 
setting the LSN");
-                id = ILSMDiskComponentId.NOT_FOUND;
-            }
             return new LSMDiskComponentId(id, id);
         } else {
             long minId = Long.MAX_VALUE;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2015
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d85c1a0a2e9f04bac1c56113987aa48e1beafe2
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>

Reply via email to