You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "HTHou (via GitHub)" <gi...@apache.org> on 2024/04/29 07:22:37 UTC
[PR] [IOTDB-1667] Speed up the deletion of database by avoiding flush [iotdb]
HTHou opened a new pull request, #12445:
URL: https://github.com/apache/iotdb/pull/12445
## Description
https://issues.apache.org/jira/browse/IOTDB-1667
## How to test
Add a UT in DataRegionTest.
Before this PR, syncDeleteDataFiles costs `101ms ~ 1121ms`.
After this PR, syncDeleteDataFiles costs about `12ms`.
```
@Test
public void testIoTDBTabletWriteAndDeleteDataRegion()
throws QueryProcessException, IllegalPathException, WriteProcessException,
TsFileProcessorException {
String[] measurements = new String[2];
measurements[0] = "s0";
measurements[1] = "s1";
TSDataType[] dataTypes = new TSDataType[2];
dataTypes[0] = TSDataType.INT32;
dataTypes[1] = TSDataType.INT64;
MeasurementSchema[] measurementSchemas = new MeasurementSchema[2];
measurementSchemas[0] = new MeasurementSchema("s0", TSDataType.INT32, TSEncoding.PLAIN);
measurementSchemas[1] = new MeasurementSchema("s1", TSDataType.INT64, TSEncoding.PLAIN);
long[] times = new long[100];
Object[] columns = new Object[2];
columns[0] = new int[100];
columns[1] = new long[100];
for (int r = 0; r < 100; r++) {
times[r] = r;
((int[]) columns[0])[r] = 1;
((long[]) columns[1])[r] = 1;
}
InsertTabletNode insertTabletNode1 =
new InsertTabletNode(
new QueryId("test_write").genPlanNodeId(),
new PartialPath("root.vehicle.d0"),
false,
measurements,
dataTypes,
measurementSchemas,
times,
null,
columns,
times.length);
dataRegion.insertTablet(insertTabletNode1);
for (int r = 50; r < 149; r++) {
times[r - 50] = r;
((int[]) columns[0])[r - 50] = 1;
((long[]) columns[1])[r - 50] = 1;
}
InsertTabletNode insertTabletNode2 =
new InsertTabletNode(
new QueryId("test_write").genPlanNodeId(),
new PartialPath("root.vehicle.d0"),
false,
measurements,
dataTypes,
measurementSchemas,
times,
null,
columns,
times.length);
dataRegion.insertTablet(insertTabletNode2);
long start = System.nanoTime();
dataRegion.syncDeleteDataFiles();
System.out.println(System.nanoTime() - start);
Assert.assertEquals(0, SystemInfo.getInstance().getTotalMemTableSize());
QueryDataSource queryDataSource =
dataRegion.query(
Collections.singletonList(new PartialPath(deviceId, measurementId)),
deviceId,
context,
null,
null);
Assert.assertEquals(0, queryDataSource.getSeqResources().size());
Assert.assertEquals(0, queryDataSource.getUnseqResources().size());
}
```
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [IOTDB-1667] Speed up the deletion of database by avoiding flush [iotdb]
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum merged PR #12445:
URL: https://github.com/apache/iotdb/pull/12445
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [IOTDB-1667] Speed up the deletion of database by avoiding flush [iotdb]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #12445:
URL: https://github.com/apache/iotdb/pull/12445#issuecomment-2082119331
## [Codecov](https://app.codecov.io/gh/apache/iotdb/pull/12445?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `93.33333%` with `1 lines` in your changes are missing coverage. Please review.
> Project coverage is 42.93%. Comparing base [(`85f47e0`)](https://app.codecov.io/gh/apache/iotdb/commit/85f47e09d2e73cb1aeda9973728a247743ce4548?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`4779801`)](https://app.codecov.io/gh/apache/iotdb/pull/12445?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 3 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/iotdb/pull/12445?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../iotdb/db/storageengine/dataregion/DataRegion.java](https://app.codecov.io/gh/apache/iotdb/pull/12445?src=pr&el=tree&filepath=iotdb-core%2Fdatanode%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Fdb%2Fstorageengine%2Fdataregion%2FDataRegion.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL0RhdGFSZWdpb24uamF2YQ==) | 75.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/12445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #12445 +/- ##
============================================
- Coverage 43.37% 42.93% -0.45%
Complexity 69 69
============================================
Files 3102 3102
Lines 191553 191660 +107
Branches 22806 22835 +29
============================================
- Hits 83085 82280 -805
- Misses 108468 109380 +912
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/iotdb/pull/12445?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [IOTDB-1667] Speed up the deletion of database by avoiding flush [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #12445:
URL: https://github.com/apache/iotdb/pull/12445#issuecomment-2082057042
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=12445) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=12445&metric=new_coverage&view=list) (required ≥ 80%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=12445)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org