Lift the storage limit for tag and attribute management#12447
Merged
JackieTien97 merged 11 commits intoapache:masterfrom May 6, 2024
Merged
Conversation
JackieTien97
requested changes
Apr 30, 2024
Contributor
JackieTien97
left a comment
There was a problem hiding this comment.
We also need to add some it for this.
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagLogFile.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagLogFile.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java
Outdated
Show resolved
Hide resolved
Comment on lines
+254
to
+255
| private int tagAttributeEachMaxNum = 20; | ||
| private int tagAttributeEachMaxSize = 100; |
Contributor
There was a problem hiding this comment.
Add all of these two config into iotdb-common.properties in iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties and load these two in CommonDescriptor.loadCommonProps.
Contributor
There was a problem hiding this comment.
also remember to change the comments about tag_attribute_total_size in iotdb-core/node-commons/src/assembly/resources/conf/iotdb-common.properties
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagLogFile.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagLogFile.java
Outdated
Show resolved
Hide resolved
...ore/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagLogFile.java
Show resolved
Hide resolved
Comment on lines
+228
to
+229
| if (blockOffset.size() | ||
| > blockNumReal) { // if the original space is larger than the new space, the original |
JackieTien97
requested changes
Apr 30, 2024
| blockOffset.add(position); | ||
| for (int i = 1; i < blockNum; i++) { | ||
| blockOffset.add(ReadWriteIOUtils.readLong(byteBuffers)); | ||
| Long nextPosition = ReadWriteIOUtils.readLong(byteBuffers); |
Contributor
There was a problem hiding this comment.
Suggested change
| Long nextPosition = ReadWriteIOUtils.readLong(byteBuffers); | |
| long nextPosition = ReadWriteIOUtils.readLong(byteBuffers); |
| @@ -181,18 +180,16 @@ public void addIndex(String tagKey, String tagValue, IMeasurementMNode<?> measur | |||
|
|
|||
| int memorySize = 0; | |||
| @@ -212,20 +209,18 @@ public void removeIndex(String tagKey, String tagValue, IMeasurementMNode<?> mea | |||
| // init memory size | |||
| int memorySize = 0; | |||
JackieTien97
approved these changes
Apr 30, 2024
SzyWilliam
pushed a commit
to SzyWilliam/iotdb
that referenced
this pull request
Nov 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this implementation is that for a tagmap that stores more than tagAttributeTotalSize, the program can support continuing to allocate a new space of the length of tagAttributeTotalSize and continue to store it.
Storage design:
Implementation details:
Current reading process:
Current writing process:
The difficulty in this part is that the offset of the file will change with reading and writing. You need to always pay attention to the changes in the position and limit of the bytebuffer and make adjustments.
extra work