Skip to content

Fix/unconsensus tsfile mods#18008

Open
hongzhi-gao wants to merge 5 commits into
apache:masterfrom
hongzhi-gao:fix/unconsensus-tsfile-mods
Open

Fix/unconsensus tsfile mods#18008
hongzhi-gao wants to merge 5 commits into
apache:masterfrom
hongzhi-gao:fix/unconsensus-tsfile-mods

Conversation

@hongzhi-gao

Copy link
Copy Markdown
Contributor

Description

Fix snapshot loader mods placement across receive folders

Share fileTarget across all receive dirs in loadSnapshotFromMultipleDirs(), so a tsfile and its companion mods are linked to the same data dir even when fragments arrive in different folders.

Add regression tests

Add a unit test for spread snapshot fragments and a 1C3D cluster IT that verifies DELETE remains visible on all replicas after region migrate with multiple data dirs.

IT infra tweaks

Allow setDnDataDirs in cluster ITs and query replicas via table SQL dialect.


This PR has:

  • been self-reviewed.
  • 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.

Key changed/added classes (or packages if there are too many classes) in this PR
  • SnapshotLoader
  • IoTDBSnapshotTest
  • IoTDBRegionMigrateWithDeletionMultiDataDirIT
  • DataNodeWrapper
  • DataNodeConfig / MppDataNodeConfig

When IoTConsensus snapshot fragments land in different receive folders, share fileTarget across dirs so companion mods follow their tsfile. Add unit and cluster IT coverage for delete visibility after region migrate.
These setters were only needed for an uncommitted manual IT and are not used by the snapshot loader fix.
…ir signature

The test reflectively invoked the old 3-arg
createLinksFromSnapshotToSourceDir(String, File[], FolderManager), but the
production method now takes a Map<String,String> fileTarget as a 4th argument,
causing NoSuchMethodException. Look up the current signature, pass a fileTarget
map, and assert the shared fileKey is recorded exactly once at one of the data
dirs.
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.

2 participants