Repository navigation
importinto: log chunk count and size (#70271) - #70338
ti-chi-bot[bot] merged 2 commits into
Conversation
📝 WalkthroughWalkthroughThe importer now logs subtask chunk counts and processor chunk sizes. ChangesImporter observability
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pkg/executor/importer/chunk_process_testkit_test.go (1)
154-160: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the completion log as well.
The PR objective requires
chunkSizeon both the chunk start and completion logs. These assertions inspect only"process chunk start". Add an assertion for the completion log and itschunkSizefield.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/executor/importer/chunk_process_testkit_test.go` around lines 154 - 160, Extend the test after processing in the relevant chunk processor test to also filter the completion log, assert exactly one completion entry, and verify its ContextMap()["chunkSize"] equals int64(len(sourceData)), matching the existing start-log assertions.pkg/executor/importer/table_import.go (1)
121-128: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winVerify coverage for both
Chunk.GetSizebranches.
Chunk.GetSizehas two different size contracts. The supplied processor test covers only the non-Parquet path with a zero offset. Add or confirm deterministic tests for a Parquet chunk and a non-zeroOffset.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/executor/importer/table_import.go` around lines 121 - 128, Expand tests for Chunk.GetSize to cover both branches: verify a Parquet chunk returns FileSize regardless of Offset/EndOffset, and verify a non-Parquet chunk with a non-zero Offset returns EndOffset minus Offset. Keep the test inputs deterministic and assert each branch’s distinct size contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/executor/importer/chunk_process_testkit_test.go`:
- Around line 154-160: Extend the test after processing in the relevant chunk
processor test to also filter the completion log, assert exactly one completion
entry, and verify its ContextMap()["chunkSize"] equals int64(len(sourceData)),
matching the existing start-log assertions.
In `@pkg/executor/importer/table_import.go`:
- Around line 121-128: Expand tests for Chunk.GetSize to cover both branches:
verify a Parquet chunk returns FileSize regardless of Offset/EndOffset, and
verify a non-Parquet chunk with a non-zero Offset returns EndOffset minus
Offset. Keep the test inputs deterministic and assert each branch’s distinct
size contract.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ca5ca959-60ea-4b1b-9b18-78c9084c5715
📒 Files selected for processing (5)
pkg/dxf/importinto/task_executor.gopkg/executor/importer/BUILD.bazelpkg/executor/importer/chunk_process.gopkg/executor/importer/chunk_process_testkit_test.gopkg/executor/importer/table_import.go
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-nextgen-202603 #70338 +/- ##
===========================================================
Coverage ? 76.3185%
===========================================================
Files ? 1937
Lines ? 542103
Branches ? 0
===========================================================
Hits ? 413725
Misses ? 128378
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, joechenrh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6b4c9f9
into
pingcap:release-nextgen-202603
This is an automated cherry-pick of #70271
What problem does this PR solve?
Issue Number: ref #61702
Problem Summary:
Import Into encode subtasks do not currently expose how many chunks they need to process or the size of each chunk, making chunk-related failures harder to diagnose.
What changed and how does it work?
EndOffset - Offset, to the per-chunk logger.Check List
Tests
parquet
csv
Targeted validation:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
New Features
Tests