Repository navigation
*: support Local MATCH AGAINST Boolean evaluation and TiFlash pushdown | pd=release-8.5 tikv=release-8.5 tiflash=release-8.5 ticdc=release-8.5 - #71839
Conversation
|
Skipping CI for Draft Pull Request. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Require default MPP execution settings, validate decoded statement-summary envelopes, and reject cop/batchCop-only native plans. Add a collation-aware stopword differential matrix and reusable h124 cluster, SQL benchmark, process sampling, and CPU profile tools. Verified with real TiUP clusters at token sizes 2/3 and paired single-thread server runs; benchmark tool and plan-validator unit tests pass.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/release-8.5-fts #71839 +/- ##
============================================================
Coverage ? 55.3315%
============================================================
Files ? 1866
Lines ? 670829
Branches ? 0
============================================================
Hits ? 371180
Misses ? 271913
Partials ? 27736
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@solotzg: solotzg unauthorized: /override is restricted to Repo administrators, and the following github teams:pingcap/tidb: tidb-maintainers qa-release-merge. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cc @AilinKid |
|
/test pull-integration-tici-test |
|
@solotzg: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/cc @windtalker @qw4990 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: AilinKid, qw4990 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
7b255e0
into
pingcap:feature/release-8.5-fts
What problem does this PR solve?
Issue Number: ref #71397 pingcap/tiflash#11111
Provide row-wise Boolean Local MATCH and eligible TiFlash scalar pushdown without relying on TiCI or inverted-index consistency.
What changed and how does it work?
tidb_enable_local_match_against(default OFF) gates both TiDB and TiFlash local execution. With the gate ON, eligible TiFlash MPP Selection evaluation is available to the optimizer; unsupported pushdown is evaluated at TiDB root. OFF rejects Local MATCH. This PR does not implement native indexed FTS.Expr.valforLocalMatchAgainstBoolean = 5250. Semantic protocol version 2 is shared with TiFlash; unsupported versions are rejected. Deploy compatible TiFlash support before TiDB emits a new version, and do not silently change an existing version's meaning.*prefixes with STANDARD/NGRAM, configured token lengths, built-in stopwords, NULL searches/documents and multiple MATCH columns. This is no-score Boolean filtering, not relevance ranking or new Boolean syntax.collation_server. Align BMP word classification and multibyte NGRAM scanning across Go/C++; preserve filtered phrase positions and verify necessary phrases against the unfiltered document.Dependencies
Paired with TiFlash PR pingcap/tiflash#11111. The scalar-ID reservation pingcap/tipb#431 and feature protocol pingcap/tipb#432 are merged. Both products use the official PingCAP Tipb revision
4044aac591d778250cad3488dfd6e6f574411f1a: TiDB through module versionv0.0.0-20261014084553-4044aac591d7and TiFlash throughcontrib/tipb. The forked Tipb dependency is no longer required. Compatible TiFlash support must be deployed before enabling TiDB pushdown that emits this protocol.Correctness verification (2026-10-12)
The correctness and performance results below are historical evidence from the 2026-10-12 validation runs, not a fresh rerun of the current PR heads. The latest follow-up changes have not been rerun locally; their validation is left to CI for the corresponding PR heads. Historical E2E/performance results do not establish current-head or formal release acceptance.
AVAILABLE=1, compare complete matched results and require MATCH inmpp[tiflash]Selection without a root MATCH residual. Fallback tests compare complete row IDs and assert TiDB root evaluation. No TiCI path is used.Performance verification
On the shared h124 server, a development benchmark used 20,000 × 4 KiB repeated synthetic documents, STANDARD/NGRAM, stopwords OFF/ON, five query shapes, default MPP settings and native SQL threads=1. Single-connection TiFlash MPP end-to-end P50 was 2.96–6.95× faster than TiDB fallback across the selected cases; complete matched IDs and actual plan placement were checked. This compares different scan engines and execution paths, not isolated Go/C++ matcher speed.
Separate paired regression checks observed persistent small increases for NGRAM size=2 with stopwords ON: about 0.8–1.0% for TiDB word/prefix/phrase in an independent follow-up and 1.3–2.2% for TiFlash prefix/CJK in the main measurements. Root cause is not established; do not claim zero performance regression or use other cases' improvements to cancel these observations.
These are development measurements, not an SLA or release acceptance. The host is shared, CPU frequency is not pinned, the corpus is repetitive and highly compressible, and h124 TiFlash is RELWITHDEBINFO (
-O2 -g -DNDEBUG), not an official release package. Tests use official v8.5.8 PD/TiKV with locally built modified products, identified by runtime versions and binary fingerprints; TiDB identity is checked withtidb_version(). Raw logs, measurements, complete-result/plan records and detailed reports are retained outside the product repositories and are not public CI artifacts.Remaining acceptance work
Opt-in memory pressure was skipped; ASAN/UBSAN and full token/position differential coverage remain pending. Ready for code review does not mean formal release acceptance.
Release note
Summary by CodeRabbit
MATCH ... AGAINSTsearches can run in TiFlash when supported; TiDB handles cases that cannot be pushed down.