You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 34cc346
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/MemTableFlushTask.java
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java
+16-3Lines changed: 16 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -210,8 +210,9 @@ public void sortTvListForFlush() {
210
210
/*
211
211
* Concurrency background:
212
212
*
213
-
* A query may start earlier and record the current row count (rows) of the TVList as its visible range.
214
-
* After that, new unseq writes may arrive and immediately trigger a flush, which will sort the TVList.
213
+
* A query may start earlier and record the current row count (rows) of the TVList as its
214
+
* visible range. After that, new unseq writes may arrive and immediately trigger a flush, which
215
+
* will sort the TVList.
215
216
*
216
217
* During sorting, the underlying indices array of the TVList may be reordered.
217
218
* If the query continues to use the previously recorded rows as its upper bound,
@@ -223,6 +224,9 @@ public void sortTvListForFlush() {
223
224
* To avoid this issue, when there are active queries on the working TVList, we must
224
225
* clone the times and indices before sorting, so that the flush sort does not mutate
225
226
* the data structures that concurrent queries rely on.
227
+
*
228
+
* Flushing-memtable queries may also reuse workingListForFlush instead of the original working
229
+
* TVList for the same reason.
226
230
*/
227
231
booleanneedCloneTimesAndIndicesInWorkingTVList;
228
232
workingList.lockQueryList();
@@ -232,7 +236,7 @@ public void sortTvListForFlush() {
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedReadOnlyMemChunk.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ public AlignedReadOnlyMemChunk(
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/IWritableMemChunk.java
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/ReadOnlyMemChunk.java
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java
Copy file name to clipboardExpand all lines: iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/PrimitiveMemTableTest.java
+58-1Lines changed: 58 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,63 @@ public void testWriteAndFlushSortDuringQuerySortTVListAndActualQueryExecution()
0 commit comments