JackieTien97 commented on code in PR #17193:
URL: https://github.com/apache/iotdb/pull/17193#discussion_r2791301496
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedWritableMemChunk.java:
##########
@@ -557,6 +550,8 @@ public void encodeWorkingAlignedTVList(
long maxNumberOfPointsInChunk,
int maxNumberOfPointsInPage) {
BitMap allValueColDeletedMap;
+ AlignedTVList list = (AlignedTVList) listForFlushSort;
Review Comment:
Change all used places to listForFlushSort instead of hiding the `list`
field.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java:
##########
@@ -165,6 +165,18 @@ public TVList getTvListByColumnIndex(
return alignedTvList;
}
+ @Override
+ public AlignedTVList cloneForFlushSort() {
Review Comment:
```suggestion
public synchronized AlignedTVList cloneForFlushSort() {
```
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java:
##########
@@ -198,7 +200,41 @@ public abstract void writeAlignedTablet(
public abstract IMeasurementSchema getSchema();
@Override
- public abstract void sortTvListForFlush();
+ public synchronized void sortTvListForFlush() {
Review Comment:
why we need `synchronized` here? Will sort for one memtable be parallel?
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java:
##########
@@ -198,7 +200,41 @@ public abstract void writeAlignedTablet(
public abstract IMeasurementSchema getSchema();
@Override
- public abstract void sortTvListForFlush();
+ public synchronized void sortTvListForFlush() {
Review Comment:
including the encode method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]