You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "GoodBoyCoder (via GitHub)" <gi...@apache.org> on 2024/07/15 13:36:20 UTC

[PR] Bugfix: Fixed that the same record has different lowkeys due to mixed case of table names [incubator-seata]

GoodBoyCoder opened a new pull request, #6678:
URL: https://github.com/apache/incubator-seata/pull/6678

   <!-- Please make sure you have read and understood the contributing guidelines -->
   
   - [ ] I have registered the PR [changes](../changes).
   
   ### Ⅰ. Describe what this PR did
   When the database is case-insensitive, if different services use table names with different case to query the same record, the lock RowKey will be inconsistent, causing the same global transaction lock to fail to re-enter. This PR unifies the record table name of TableMetaCache with the actual converted table name to avoid this situation.
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
   fixes #6612 
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   Seata Version: 2.0.0
   Database: oracle-xe-11g with JDBC ojdbc6:11.2.0.4.0
   How to reproduce? using Oracle database as an example. In a GlobalTransactional
   Service A: Use SQL1  -  update stock_tbl set count = count - ? where id= "1"
   Service B: Use SQL2  -  update stock_TBL set count = count - ? where id = "1"
   
   The RowKey generated by service A is resourceId^^^stock_tbl^^^1, while service B is resourceId^^^stock_TBL^^^1
   The result is that Service A cannot acquire global lock.
   
   Using the same case, the transaction can be committed normally after modification
   ### Ⅴ. Special notes for reviews
   It should be noted that after upgrading, if there are uncleared locks in the old version, there may be lock conflicts, causing transactions to roll back.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] Bugfix: Fixed that the same record has different lowkeys due to mixed case of table names [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #6678:
URL: https://github.com/apache/incubator-seata/pull/6678#issuecomment-2228559450

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `77.77778%` with `4 lines` in your changes missing coverage. Please review.
   > Project coverage is 50.88%. Comparing base [(`933b492`)](https://app.codecov.io/gh/apache/incubator-seata/commit/933b492da88e145ca2b7f152ed3b03693936b068?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`80a67c5`)](https://app.codecov.io/gh/apache/incubator-seata/commit/80a67c507c6eb9bab3eccface7dd3a35b55bd313?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 41 commits behind head on 2.x.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/6678/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@             Coverage Diff              @@
   ##                2.x    #6678      +/-   ##
   ============================================
   - Coverage     51.13%   50.88%   -0.26%     
   - Complexity     5317     5833     +516     
   ============================================
     Files           950     1051     +101     
     Lines         33448    36341    +2893     
     Branches       4048     4319     +271     
   ============================================
   + Hits          17103    18491    +1388     
   - Misses        14666    15990    +1324     
   - Partials       1679     1860     +181     
   ```
   
   | [Files](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [.../datasource/sql/struct/cache/DmTableMetaCache.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fsql%2Fstruct%2Fcache%2FDmTableMetaCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9zcWwvc3RydWN0L2NhY2hlL0RtVGFibGVNZXRhQ2FjaGUuamF2YQ==) | `83.14% <100.00%> (ø)` | |
   | [...asource/sql/struct/cache/OracleTableMetaCache.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fsql%2Fstruct%2Fcache%2FOracleTableMetaCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9zcWwvc3RydWN0L2NhY2hlL09yYWNsZVRhYmxlTWV0YUNhY2hlLmphdmE=) | `67.30% <100.00%> (ø)` | |
   | [...rce/sql/struct/cache/PostgresqlTableMetaCache.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fsql%2Fstruct%2Fcache%2FPostgresqlTableMetaCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9zcWwvc3RydWN0L2NhY2hlL1Bvc3RncmVzcWxUYWJsZU1ldGFDYWNoZS5qYXZh) | `74.74% <75.00%> (+0.02%)` | :arrow_up: |
   | [...urce/sql/struct/cache/SqlServerTableMetaCache.java](https://app.codecov.io/gh/apache/incubator-seata/pull/6678?src=pr&el=tree&filepath=rm-datasource%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Frm%2Fdatasource%2Fsql%2Fstruct%2Fcache%2FSqlServerTableMetaCache.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cm0tZGF0YXNvdXJjZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VhdGEvcm0vZGF0YXNvdXJjZS9zcWwvc3RydWN0L2NhY2hlL1NxbFNlcnZlclRhYmxlTWV0YUNhY2hlLmphdmE=) | `78.89% <75.00%> (-0.31%)` | :arrow_down: |
   
   ... and [162 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/6678/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] bugfix: Fixed that the same record has different lowkeys due to mixed case of table names [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes merged PR #6678:
URL: https://github.com/apache/incubator-seata/pull/6678


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org