Repository navigation
add some logging and fix a small bug - #22639
Merged
Merged
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
aptend
approved these changes
Oct 20, 2025
XuPeng-SH
added a commit
to XuPeng-SH/matrixone
that referenced
this pull request
Oct 20, 2025
### **User description** ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#22638 ## What this PR does / why we need it: add some logging and fix a small bug ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Improved logging in stopReceiver with time-based intervals - Fixed typo: `histroyRetention` to `historyRetention` - Corrected error type: `NewNotFoundNoCtx()` to `NewTxnNotFoundNoCtx()` - Enhanced DB open process with detailed phase logging - Added error handling in prepareAObjSortedData to prevent resource leaks - Removed unused variables and debug code ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Bug Fixes"] --> B["Typo corrections"] A --> C["Error type fix"] A --> D["Resource leak prevention"] E["Logging Enhancements"] --> F["Time-based log intervals"] E --> G["Phase-based DB open logging"] H["Code Cleanup"] --> I["Remove unused variables"] H --> J["Remove debug code"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>controller.go</strong><dd><code>Improve logging and remove unused variables</code> </dd></summary> <hr> pkg/vm/engine/tae/db/controller.go <ul><li>Improved logging in <code>stopReceiver</code> with time-based intervals instead of <br>modulo-based<br> <li> Changed sleep duration from 1ms to 20ms for better performance<br> <li> Simplified log message formatting<br> <li> Removed unused <code>errMsg</code> variable from <code>AssembleDB</code> function</ul> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-d628bae620ca91ce3a3f310a6245d7064c8b53a86d1ee5d183a273358b023719">+5/-9</a> </td> </tr> <tr> <td> <details> <summary><strong>open.go</strong><dd><code>Add comprehensive phase logging to DB open</code> </dd></summary> <hr> pkg/vm/engine/tae/db/open.go <ul><li>Added detailed phase-based logging for DB open process (start, WAL <br>open, catalog open, end)<br> <li> Simplified final log output by removing redundant fields<br> <li> Removed TODO comment and debug code<br> <li> Added error logging during catalog open phase</ul> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-70f750e6241afa9a68b84ae68293c78c247640ee87b5225c5d3b7265ca531797">+10/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>db.go</strong><dd><code>Fix typos and improve variable naming</code> </dd></summary> <hr> pkg/vm/engine/tae/db/db.go <ul><li>Fixed typo: <code>histroyRetention</code> to <code>historyRetention</code> in parameter and <br>usage<br> <li> Renamed variable <code>forceICKPDuration</code> to <code>forceFlushDuration</code> for clarity<br> <li> Updated log field name to match corrected variable name</ul> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-dc613bd920e611e7549691db0f4ea362f198d8e79f02892e1b48519b924c73cb">+6/-6</a> </td> </tr> <tr> <td> <details> <summary><strong>replay.go</strong><dd><code>Fix error handling order in replay</code> </dd></summary> <hr> pkg/vm/engine/tae/db/replay.go <ul><li>Moved error check before type assertion to prevent panic on nil<br> <li> Added TODO comment explaining onSuccess behavior with errors</ul> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-1b624eda15c6fe088d89177b50c04263f846872b22e1c8bcd9a82958b3e5d578">+4/-2</a> </td> </tr> <tr> <td> <details> <summary><strong>flushTableTail.go</strong><dd><code>Add resource cleanup on error</code> </dd></summary> <hr> pkg/vm/engine/tae/tables/jobs/flushTableTail.go <ul><li>Added defer block to close batch and prevent resource leaks on error<br> <li> Ensures proper cleanup of containers.Batch when error occurs</ul> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-0b958d0044e734c5cb32254c0e45c0beaf0e4fdc1f4c846c0bde0fd917da63b0">+7/-0</a> </td> </tr> </table></td></tr><tr><td><strong>Code cleanup</strong></td><td><table> <tr> <td> <details> <summary><strong>scheduler.go</strong><dd><code>Remove commented-out code</code> </dd></summary> <hr> pkg/vm/engine/tae/db/scheduler.go - Removed commented-out code for GCTask condition </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/22639/files#diff-5685ec4e51b108a55b7c30b854835395c7b23eeb26a3c51bd9cedd8ce0631da5">+0/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #22638
What this PR does / why we need it:
add some logging and fix a small bug
PR Type
Bug fix, Enhancement
Description
Improved logging in stopReceiver with time-based intervals
Fixed typo:
histroyRetentiontohistoryRetentionCorrected error type:
NewNotFoundNoCtx()toNewTxnNotFoundNoCtx()Enhanced DB open process with detailed phase logging
Added error handling in prepareAObjSortedData to prevent resource leaks
Removed unused variables and debug code
Diagram Walkthrough
File Walkthrough
controller.go
Improve logging and remove unused variablespkg/vm/engine/tae/db/controller.go
stopReceiverwith time-based intervals instead ofmodulo-based
errMsgvariable fromAssembleDBfunctionopen.go
Add comprehensive phase logging to DB openpkg/vm/engine/tae/db/open.go
open, catalog open, end)
db.go
Fix typos and improve variable namingpkg/vm/engine/tae/db/db.go
histroyRetentiontohistoryRetentionin parameter andusage
forceICKPDurationtoforceFlushDurationfor clarityreplay.go
Fix error handling order in replaypkg/vm/engine/tae/db/replay.go
flushTableTail.go
Add resource cleanup on errorpkg/vm/engine/tae/tables/jobs/flushTableTail.go
scheduler.go
Remove commented-out codepkg/vm/engine/tae/db/scheduler.go