You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2024/07/17 16:39:46 UTC
Change in asterixdb[master]: [ASTERIXDB-3463] Revert ASTERIXDB-3360
From Wail Alkowaileet <wa...@gmail.com>:
Wail Alkowaileet has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18493 )
Change subject: [ASTERIXDB-3463] Revert ASTERIXDB-3360
......................................................................
[ASTERIXDB-3463] Revert ASTERIXDB-3360
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Revert ASTERIXDB-3360 as it has caused several
issues. This can be revesited in the future and
can be eneabled again.
Ext-ref: MB-62736
Change-Id: I24b4e7bcd5790b04d0db7b3c2796ca09f0206040
---
M hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/CompressedBufferedFileHandle.java
M asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/ColumnBatchWriter.java
M asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/stream/out/MultiPersistentBufferBytesOutputStream.java
3 files changed, 21 insertions(+), 17 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/93/18493/1
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/stream/out/MultiPersistentBufferBytesOutputStream.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/stream/out/MultiPersistentBufferBytesOutputStream.java
index 90aacc7..c910131 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/stream/out/MultiPersistentBufferBytesOutputStream.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/bytes/stream/out/MultiPersistentBufferBytesOutputStream.java
@@ -38,12 +38,6 @@
@Override
protected void preReset() throws HyracksDataException {
if (allocatedBytes > 0) {
- /*
- * Ensure limit is set to current position and position is set to 0. This to ensure no unrelated bytes are
- * persisted to disk. Unrelated bytes are bytes that were in the ByteBuffer (when the column writer
- * confiscated it from the buffer cache) but those byte do not belong to the column that to be written.
- */
- currentBuf.flip();
//Persist all buffers before resetting the stream
multiPageOpRef.getValue().persist();
allocatedBytes = 0;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/ColumnBatchWriter.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/ColumnBatchWriter.java
index 1d8f684..ee12140 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/ColumnBatchWriter.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/ColumnBatchWriter.java
@@ -94,10 +94,7 @@
}
// compute the final length
- int totalLength = nonKeyColumnStartOffset + columns.size();
- // reset to ensure the last buffer's position and limit are set appropriately
- columns.reset();
- return totalLength;
+ return nonKeyColumnStartOffset + columns.size();
}
@Override
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/CompressedBufferedFileHandle.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/CompressedBufferedFileHandle.java
index 6bc85ff..86511d1 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/CompressedBufferedFileHandle.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/CompressedBufferedFileHandle.java
@@ -111,11 +111,7 @@
final long bytesWritten;
final long expectedBytesWritten;
- if (cPage.isLargePage()) {
- fixBufferPointers(uBuffer, 0);
- } else {
- uBuffer.position(0);
- }
+ fixBufferPointers(uBuffer, 0);
long offset;
if (compressToWriteBuffer(uBuffer, cBuffer) < bufferCache.getPageSize()) {
cBuffer.position(0);
@@ -125,8 +121,6 @@
} else {
// Compression did not gain any savings
final ByteBuffer[] buffers = header.prepareWrite(cPage);
- // Incompressible pages should be written entirely
- fixBufferPointers(buffers[1], 0);
offset = compressedFileManager.writePageInfo(pageId, bufferCache.getPageSizeWithHeader());
expectedBytesWritten = buffers[0].limit() + (long) buffers[1].limit();
bytesWritten = context.write(ioManager, handle, offset, buffers);
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18493
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I24b4e7bcd5790b04d0db7b3c2796ca09f0206040
Gerrit-Change-Number: 18493
Gerrit-PatchSet: 1
Gerrit-Owner: Wail Alkowaileet <wa...@gmail.com>
Gerrit-MessageType: newchange