Skip to content

[IOTDB-2338] ID Table recovery#4897

Merged
wangchao316 merged 7 commits intomasterfrom
xkf_idtable_recovery
Jan 22, 2022
Merged

[IOTDB-2338] ID Table recovery#4897
wangchao316 merged 7 commits intomasterfrom
xkf_idtable_recovery

Conversation

@SilverNarcissus
Copy link
Copy Markdown
Contributor

@SilverNarcissus SilverNarcissus commented Jan 19, 2022

Description

Implement id table recovery logic. After this PR, id table can recover from it's log without mlog.

Design doc: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=195727793

JIRA: https://issues.apache.org/jira/browse/IOTDB-2338


This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

@coveralls
Copy link
Copy Markdown

coveralls commented Jan 19, 2022

Coverage Status

Coverage decreased (-0.1%) to 67.747% when pulling db35877 on xkf_idtable_recovery into 9e1d3bc on master.

try {
IDiskSchemaManager.recover(this);
} catch (IOException e) {
logger.error("can't recover id table of " + storageGroupDir.getName());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please print log use {}.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed~


@Override
public void recover(IDTable idTable) throws IOException {
FileInputStream inputStream = new FileInputStream(dataFile);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stream should try(), or close in finally.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed~

Copy link
Copy Markdown
Member

@wangchao316 wangchao316 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@MarcosZyk MarcosZyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

Copy link
Copy Markdown
Contributor

@bigreybear bigreybear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

78.8% 78.8% Coverage
0.0% 0.0% Duplication

@wangchao316 wangchao316 merged commit 403f059 into master Jan 22, 2022
xinzhongtianxia pushed a commit to xinzhongtianxia/iotdb that referenced this pull request Jan 23, 2022
…ubernetes_helm

* remotes/upstream/master: (76 commits)
  [IOTDB-2468][Compaction]There is 'null' in logs (apache#4958)
  [IOTDB-2464] simplify crossSpaceComapctionExceptionHandler (apache#4945)
  [DOC] Update auto create metadata docs (apache#4955)
  [IOTDB-2338] ID Table recovery (apache#4897)
  [IOTDB-2373][Trigger] MQTTSink: there should be a timeout rule (apache#4953)
  [IOTDB-2462] Fix ALIGN BY DEVICE query in cluster mode (apache#4947)
  [IOTDB-2465][imple] fix implement of snapshot of dropwizard to UniformReservoir
  [IOTDB-2463] Fix snapshot compatibility (apache#4951)
  fix spotless
  [IOTDB-2281][IOTDB-2286] fix bugs of csv tools (apache#4941)
  [IOTDB-2425][env] rename IOTDB_CLI_HOME to IOTDB_HOME in CLI (apache#4949)
  Revert "[env] rename IOTDB_CLI_HOME to IOTDB_HOME (apache#4944)" (apache#4948)
  [env] rename IOTDB_CLI_HOME to IOTDB_HOME (apache#4944)
  [IOTDB-2453] Set the default compaction priority to `BALANCE` (apache#4938)
  Fix compile error (apache#4943)
  [IOTDB-2380] add show schema interface for show measurements in template (apache#4940)
  [IOTDB-2460] Fix NoSuchFileException while querying and ttl happened same time (apache#4937)
  [IOTDB-2457] Fix Write is blocked after set time_index_level=FILE_TIM… (apache#4935)
  [IOTDB-2444] Refine /ping API and fix unauthorized NPE error (apache#4910)
  [IOTDB-2362] [REST API] Use noQuery to execute "count", return "SHOW is not supported" (apache#4933)
  ...

# Conflicts:
#	pom.xml
#	site/src/main/.vuepress/config.js
@HTHou HTHou deleted the xkf_idtable_recovery branch February 8, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants