-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature/iotconsensus snap multi dir #16811
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
base: master
Are you sure you want to change the base?
Feature/iotconsensus snap multi dir #16811
Conversation
| // debug print the path of consensus dir | ||
| System.out.println(file.getAbsolutePath()); |
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.
Remove this
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.
removed
| @Override | ||
| public String getRegionDirFromConsensusGroupId(ConsensusGroupId groupId) { | ||
| return buildPeerDir(storageDir, groupId); | ||
| return null; | ||
| } |
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.
Explain this
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.
removed
| public String getFolderByHashId(int hashId) throws DiskSpaceInsufficientException { | ||
| if (folders.isEmpty()) { | ||
| throw new DiskSpaceInsufficientException(folders); | ||
| } | ||
|
|
||
| List<String> healthyFolders = | ||
| folders.stream() | ||
| .filter( | ||
| folder -> | ||
| foldersStates.getOrDefault(folder, FolderState.ABNORMAL) == FolderState.HEALTHY) | ||
| .collect(Collectors.toList()); | ||
|
|
||
| if (healthyFolders.isEmpty()) { | ||
| logger.error("No healthy folders available, change system mode to read-only."); | ||
| CommonDescriptor.getInstance().getConfig().setNodeStatus(NodeStatus.ReadOnly); | ||
| CommonDescriptor.getInstance().getConfig().setStatusReason(NodeStatus.DISK_FULL); | ||
| throw new DiskSpaceInsufficientException(folders); | ||
| } | ||
|
|
||
| int index = Math.abs(hashId) % healthyFolders.size(); | ||
| return healthyFolders.get(index); | ||
| } |
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.
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.
removed
|
Should include some compatibility design, like adding storageDir to storageDirs. |
This reverts commit 1fef8e4.
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/util/LoadUtil.java
85037c6 to
7f86ba6
Compare

Description
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR