Skip to content

Part with unknown projections should not be marked as lost forever - #95952

Merged
Michicosun merged 2 commits into
masterfrom
part_with_unknown_projections
Feb 4, 2026
Merged

Michicosun merged 2 commits into
masterfrom
part_with_unknown_projections

Conversation

@Michicosun

@Michicosun Michicosun commented Feb 4, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Part with unknown projections should not be marked as lost forever

Version info

  • Merged into: 26.2.1.237

@clickhouse-gh

clickhouse-gh Bot commented Feb 4, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [c922d15]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_tsan, 6/6) failure
test_keeper_auth/test.py::test_remove_acl[get_genuine_zk] FAIL cidb
test_keeper_auth/test.py::test_digest_auth_basic[get_genuine_zk] FAIL cidb
test_keeper_auth/test.py::test_digest_auth_multiple[get_genuine_zk] FAIL cidb
test_keeper_auth/test.py::test_partial_auth[get_genuine_zk] FAIL cidb
test_keeper_auth/test.py::test_get_set_acl[get_genuine_zk] FAIL cidb
AST fuzzer (amd_debug) failure
Logical error: Unexpected return type 'A' of function 'B', should be tuple of two elements (STID: 0250-21bc) FAIL cidb
Integration tests (amd_asan, db disk, old analyzer, 3/6) error
test_sql_user_impersonate/test.py ERROR cidb
Integration tests (amd_tsan, 3/6) error
test_sql_user_impersonate/test.py ERROR cidb

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Feb 4, 2026
@Michicosun
Michicosun added this pull request to the merge queue Feb 4, 2026
Merged via the queue into master with commit 8e3d732 Feb 4, 2026
123 of 127 checks passed
@Michicosun
Michicosun deleted the part_with_unknown_projections branch February 4, 2026 19:00
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 4, 2026
@CheSema

CheSema commented Mar 16, 2026 •

Copy link
Copy Markdown
Member

I think that the change is good but it is incomplete.
In order to being able to rework it I describe what has happened with the test.

Test does:

  • insert part with 3 rows without projection
  • add projection
  • insert part with 4 rows with projection
  • detach this two parts
  • remove projection
  • attach this two parts
    • first part is attached just fine
    • second part is also attached
  • the check part operation should log a warning message Found unexpected projection directories for the second part

Test flacks when several replicas exist with test suite like '%Database replicated%', the difference is in after the attach operation:

  • second replica fetches the part
    • first replicas sends the part, send fails with the error DB::Exception: No file pp.proj in data part. (NO_FILE_IN_DATA_PART), replica aborts sending, detaches this part
  • the check part operation does not see the second part, it has been detached and this operation is replicated.

The fail on sending is a bug which should also be fixed in this PR. It happens with this stack trace

2026.02.04 21:13:15.957822 [ 36383 ] {} <Error> InterserverIOHTTPHandler: Code: 226. DB::Exception: No file pp.proj in data part. (NO_FILE_IN_DATA_PART), Stack trace (when copying this message, always include the lines below):

0. ./contrib/llvm-project/libcxx/include/__exception/exception.h:113: Poco::Exception::Exception(String const&, int) @ 0x0000000021e2a832
1. ./ci/tmp/build/./src/Common/Exception.cpp:136: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001351cb29
2. ./src/Common/Exception.h:172: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000b07768e
3. ./src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000b077149
4. ./src/Common/Exception.h:190: DB::Exception::Exception<String const&>(int, FormatStringHelperImpl<std::type_identity<String const&>::type>, String const&) @ 0x000000000b086eb6
5. ./ci/tmp/build/./src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp:93: DB::MergeTreeDataPartChecksums::checkEqual(DB::MergeTreeDataPartChecksums const&, bool, String const&) const @ 0x000000001c2d3339
6. ./ci/tmp/build/./src/Storages/MergeTree/DataPartsExchange.cpp:315: DB::DataPartsExchange::Service::sendPartFromDisk(std::shared_ptr<DB::IMergeTreeDataPart const> const&, DB::WriteBuffer&, int, bool, bool) @ 0x000000001c0d913f
7. ./ci/tmp/build/./src/Storages/MergeTree/DataPartsExchange.cpp:209: DB::DataPartsExchange::Service::processQuery(DB::HTMLForm const&, std::shared_ptr<DB::ReadBuffer>, DB::WriteBuffer&, DB::HTTPServerResponse&) @ 0x000000001c0d7229
8. ./ci/tmp/build/./src/Server/InterserverIOHTTPHandler.cpp:78: DB::InterserverIOHTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTTPServerResponse&, std::shared_ptr<DB::WriteBufferFromHTTPServerResponse>) @ 0x000000001c8dfdef
9. ./ci/tmp/build/./src/Server/InterserverIOHTTPHandler.cpp:101: DB::InterserverIOHTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&, StrongTypedef<unsigned long, ProfileEvents::EventTag> const&) @ 0x000000001c8
e0476
10. ./ci/tmp/build/./src/Server/HTTP/HTTPServerConnection.cpp:105: DB::HTTPServerConnection::run() @ 0x000000001c9a1ffb
11. ./ci/tmp/build/./base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x0000000021ef0347
12. ./ci/tmp/build/./base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x0000000021ef0955
13. ./ci/tmp/build/./base/poco/Foundation/src/ThreadPool.cpp:205: Poco::PooledThread::run() @ 0x0000000021e8993f
14. ./base/poco/Foundation/src/Thread_POSIX.cpp:341: Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000021e86f91

That part has checksum with projection, but it has been send to the replica because table metadata does not contains it any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants