Skip to content

Fix test dedup snapshot3 - #9923

Merged
mergify[bot] merged 7 commits into
matrixorigin:mainfrom
jiangxinmeng1:fix_TestDedupSnapshot3
Jun 8, 2023
Merged

mergify[bot] merged 7 commits into
matrixorigin:mainfrom
jiangxinmeng1:fix_TestDedupSnapshot3

Conversation

@jiangxinmeng1

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #9715

What this PR does / why we need it:

Open UT TestDedupSnapshot3.
Fix DedupSnapByPK and DedupSnapByMetaLocs.

@jiangxinmeng1
jiangxinmeng1 requested a review from XuPeng-SH as a code owner June 8, 2023 02:09
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Jun 8, 2023
@mergify mergify Bot added the kind/bug Something isn't working label Jun 8, 2023
@matrix-meow

Copy link
Copy Markdown
Contributor

@jiangxinmeng1 Thanks for your contributions!

The pull request fixes an issue with the DedupSnapByPK and DedupSnapByMetaLocs functions in the table.go file. The changes made to the code include adding a new function updateDedupedSegmentHintAndBlockID which updates the dedupedSegmentHint and dedupedBlockID fields of the txnTable struct. The DedupSnapByPK and DedupSnapByMetaLocs functions now call this new function instead of calling updateDedupedSegmentHint and updateDedupedBlockID separately.

However, there are some issues with this pull request:

  1. The title of the pull request is not very descriptive. It only mentions fixing a test, but does not provide any information about what the test is for or what the issue was.

Suggestion: Provide a more descriptive title that includes information about the issue being fixed.

  1. The body of the pull request is also not very informative. It only includes a checklist of the type of PR and the issue number being fixed. There is no explanation of what the issue was or how it was fixed.

Suggestion: Provide a more detailed explanation of the issue being fixed and how it was fixed.

  1. The changes made to the code are not well documented. There are no comments explaining what the new function updateDedupedSegmentHintAndBlockID does or how it works.

Suggestion: Add comments to the code explaining what the new function does and how it works.

  1. The changes made to the code could be optimized. The DedupSnapByPK and DedupSnapByMetaLocs functions now call the updateDedupedSegmentHintAndBlockID function instead of calling updateDedupedSegmentHint and updateDedupedBlockID separately. However, the updateDedupedSegmentHintAndBlockID function still calls both updateDedupedSegmentHint and updateDedupedBlockID. This could be simplified by having updateDedupedSegmentHintAndBlockID update both fields directly.

Suggestion: Simplify the code by having updateDedupedSegmentHintAndBlockID update both fields directly instead of calling updateDedupedSegmentHint and updateDedupedBlockID separately.

@matrix-meow matrix-meow added size/M Denotes a PR that changes [100,499] lines and removed size/S Denotes a PR that changes [10,99] lines labels Jun 8, 2023
@mergify
mergify Bot merged commit d4c57e9 into matrixorigin:main Jun 8, 2023
@jiangxinmeng1 jiangxinmeng1 mentioned this pull request Jun 19, 2023
1 task done
@jiangxinmeng1
jiangxinmeng1 deleted the fix_TestDedupSnapshot3 branch August 5, 2024 08:14
fengttt pushed a commit to fengttt/matrixone that referenced this pull request May 7, 2026
Open UT TestDedupSnapshot3.
Fix DedupSnapByPK and DedupSnapByMetaLocs.

Approved by: @XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants