Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: undolog rollback info more than 64MB #6483

Merged
merged 21 commits into from
Jul 31, 2024

Conversation

jsbxyyx
Copy link
Member

@jsbxyyx jsbxyyx commented Apr 17, 2024

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

fixes #6451

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@jsbxyyx jsbxyyx changed the title [WIP] bugfix: undolog longblob more than 40MB [WIP] bugfix: undolog rollback info more than 40MB Apr 17, 2024
@jsbxyyx jsbxyyx changed the title [WIP] bugfix: undolog rollback info more than 40MB bugfix: undolog rollback info more than 40MB Apr 18, 2024
@jsbxyyx jsbxyyx changed the title bugfix: undolog rollback info more than 40MB bugfix: undolog rollback info more than 64MB Apr 18, 2024
@funky-eyes funky-eyes added this to the 2.x Backlog milestone Apr 24, 2024
@funky-eyes funky-eyes modified the milestones: 2.x Backlog, 2.2.0 May 7, 2024
@funky-eyes funky-eyes added type: bug Category issues or prs related to bug. module/rm-datasource rm-datasource module labels May 7, 2024
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 30.40541% with 103 lines in your changes missing coverage. Please review.

Project coverage is 50.24%. Comparing base (522d46e) to head (3ff8876).

Files Patch % Lines
.../rm/datasource/undo/mysql/MySQLUndoLogManager.java 11.66% 50 Missing and 3 partials ⚠️
...ata/rm/datasource/undo/AbstractUndoLogManager.java 50.00% 27 Missing and 5 partials ⚠️
...rg/apache/seata/rm/datasource/DataSourceProxy.java 33.33% 10 Missing and 2 partials ⚠️
...seata/rm/datasource/undo/AbstractUndoExecutor.java 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #6483      +/-   ##
============================================
- Coverage     50.32%   50.24%   -0.08%     
- Complexity     5851     5854       +3     
============================================
  Files          1058     1058              
  Lines         36586    36707     +121     
  Branches       4347     4364      +17     
============================================
+ Hits          18412    18444      +32     
- Misses        16350    16430      +80     
- Partials       1824     1833       +9     
Files Coverage Δ
.../org/apache/seata/common/util/CollectionUtils.java 76.85% <ø> (ø)
...va/org/apache/seata/common/util/UUIDGenerator.java 0.00% <ø> (ø)
...che/seata/rm/datasource/undo/UndoLogConstants.java 100.00% <ø> (ø)
.../src/main/java/org/apache/seata/server/Server.java 38.88% <ø> (ø)
...org/apache/seata/server/session/GlobalSession.java 69.37% <ø> (ø)
...org/apache/seata/server/session/SessionHelper.java 48.12% <ø> (ø)
...seata/rm/datasource/undo/AbstractUndoExecutor.java 66.66% <0.00%> (-2.78%) ⬇️
...rg/apache/seata/rm/datasource/DataSourceProxy.java 69.56% <33.33%> (-1.63%) ⬇️
...ata/rm/datasource/undo/AbstractUndoLogManager.java 52.91% <50.00%> (-0.25%) ⬇️
.../rm/datasource/undo/mysql/MySQLUndoLogManager.java 30.00% <11.66%> (-38.75%) ⬇️

... and 1 file with indirect coverage changes

} else {
kernelVersion = version;
productVersion = version;
try (PreparedStatement preparedStatement = connection.prepareStatement("SHOW VARIABLES");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是应该弄一个variables的元数据存储的类,否则都放在datasourceproxy里,有点臃肿
Should I get a metadata storage class for variables, otherwise it will be put in datasourceproxy, which is a bit bloated?

try (PreparedStatement deletePST = conn.prepareStatement(batchDeleteSql)) {
String batchDeleteSubSql = toBatchDeleteSubUndoLogSql(xidSize, branchIdSize);
try (PreparedStatement deletePST = conn.prepareStatement(batchDeleteSql);
PreparedStatement deleteSubPST = conn.prepareStatement(batchDeleteSubSql)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么不在上面的batch delete sql中直接增加删除sub的条件?
Why not add the condition to delete sub directly in the batch delete sql above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主log和子log的条件不一样

The conditions for the main log and the sub-log are different.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主log和子log的条件不一样

The conditions for the main log and the sub-log are different.

为什么我们不能将其合并成一个sql?虽然条件不一样,可以是or的关系不是吗?
Why can't we merge it into one sql? Although the conditions are different, it can be an or relationship, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个是走索引,一个不走索引的
One is indexed, and the other is not indexed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.asf.yaml Outdated Show resolved Hide resolved
@funky-eyes funky-eyes merged commit 864348a into apache:2.x Jul 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/rm-datasource rm-datasource module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undolog Packet for query is too large when table longblob field more than 40MB
3 participants