-
Notifications
You must be signed in to change notification settings - Fork 967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IOTDB-3928][IOTDB-4097]New Compaction Performer —— Fast Compaction #7621
[IOTDB-3928][IOTDB-4097]New Compaction Performer —— Fast Compaction #7621
Conversation
…ng sensor schema in fast cross compaction performer, which will cause adding resource read lock more then one time and not releasing it later
… the unseq data has been strengthened to improve the compaction efficiency.
…paction performer in inner space compaction
…kPerformerTests to use fast compaction performer instead
…eration, which can speed up compaction
…urrent chunk or page is not large enough
} | ||
|
||
@Override | ||
public void excute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void excute() | |
public void execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
public void excute() | ||
throws PageException, IllegalPathException, IOException, WriteProcessException { | ||
compactFiles(); | ||
if (hasStartMeasurement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As startNewtMeasurement
is an individual method, there should be a method called endMeasurement
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to setNewMeasurement
.
public class FileElement { | ||
public TsFileResource resource; | ||
|
||
public boolean isOverlap = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public boolean isOverlap = false; | |
public boolean isSelected = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
throws IOException, PageException, WriteProcessException, IllegalPathException { | ||
while (!chunkMetadataQueue.isEmpty()) { | ||
ChunkMetadataElement firstChunkMetadataElement = chunkMetadataQueue.peek(); | ||
List<ChunkMetadataElement> overlappedChunkMetadatas = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<ChunkMetadataElement> overlappedChunkMetadatas = | |
List<ChunkMetadataElement> overlappedChunkMetadataList = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
|
||
public long priority; | ||
|
||
public boolean isOverlaped = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public boolean isOverlaped = false; | |
public boolean isSelected= false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
* <p>Notice: if is aligned chunk, return true if any of value chunk has data been deleted. Return | ||
* false if and only if all value chunks has no data been deleted. | ||
*/ | ||
protected boolean isChunkModified(ChunkMetadataElement chunkMetadataElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this function to a method of ChunkMetadataElement itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
while (pointPriorityReader.hasNext() | ||
&& pointPriorityReader.currentPoint().getTimestamp() < nextPageElement.startTime) { | ||
// write data point to chunk writer | ||
compactionWriter.write(pointPriorityReader.currentPoint(), subTaskId); | ||
pointPriorityReader.next(); | ||
if (candidateOverlappedPages.size() > oldSize) { | ||
// during the process of writing overlapped points, if the first page is compacted | ||
// completely or a new chunk is deserialized, there may be new pages overlapped with the | ||
// first page in page queue which are added into the list. If so, the next overlapped | ||
// page in the list may be changed, so we should re-get next overlap page here. | ||
oldSize = candidateOverlappedPages.size(); | ||
nextPageElement = candidateOverlappedPages.get(0); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The iterator pattern here is not written properly. The correct iterator pattern would call hasNext
, then next
, and then current
, but here it's not that order. So it's easy to think that the last data point is going to be lost here.
…date device time in endChunkGroup method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good feature!
New Compaction Performer, which speeds up the cross space compaction, including aligned and nonAligned timeseries.