Akshay Manchale has posted comments on this change. Change subject: Fixed issues with Replication tests ......................................................................
Patch Set 3: (3 comments) https://asterix-gerrit.ics.uci.edu/#/c/1334/3/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogRecord.java File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogRecord.java: Line 215: System.arraycopy(tuple.getFieldData(0), ((SimpleTupleReference) tuple).getTupleStartOff(), buffer.array(), > This downcast per tuple is expensive. You may add getTupleStartOff to the i I tried adding it to the interface but there are almost 20 different implementations of the interface and a lot of them don't have a tupleStartOffset. I could add the method to ITreeIndexTupleReference interface (which SimpleTupleReference implements) where only one of the implementation has no tupleStartOffset and that implementation can possibly an UnsupportedOperationExcpetion or something similar. However, that wouldn't eliminate the need to cast from ITupleReference to ITreeIndexTupleReference. https://asterix-gerrit.ics.uci.edu/#/c/1334/3/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/tuples/SimpleTupleReference.java File hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/tuples/SimpleTupleReference.java: Line 92: return (int) Math.ceil(fieldCount / 4.0); > why 4? It is because records have 2 bits for each field to represent whether the field is null, missing or present. https://asterix-gerrit.ics.uci.edu/#/c/1334/3/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/tuples/SimpleTupleWriter.java File hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/tuples/SimpleTupleWriter.java: Line 77: targetBuf[runner++] = (byte) 0xAA; > why change from 0? This initialization follows from how RecordBuilder is building records. See RecordBuilder.init for the new representation that includes a flag per field to differentiate between null and missing values. 0xAA is the default for this new representation. -- To view, visit https://asterix-gerrit.ics.uci.edu/1334 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I204a41311012dc348d4d41ae8bf6ec8554ab3dc3 Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Akshay Manchale <[email protected]> Gerrit-Reviewer: Akshay Manchale <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-HasComments: Yes
