You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "MinatoWu (via GitHub)" <gi...@apache.org> on 2025/06/10 06:46:33 UTC
[PR] Optimize/at build lock key performance [incubator-seata-go]
MinatoWu opened a new pull request, #837:
URL: https://github.com/apache/incubator-seata-go/pull/837
<!-- Thanks for sending a pull request!
-->
**What this PR does**:
Modified two buildlockkeys O (N×K) time complexity
**Which issue(s) this PR fixes**:
<!--
baseExecutor :buildLockkey :O(N×M×K)-> O(N×K);
BasicUndoLogBuilder :buildLockkey2 :O (N×M) -> O(N×K);
increase readability, improve unit testing
-->
Fixes #829
about :https://github.com/apache/incubator-seata-go/pull/714
```release-note
```
--
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] Optimize/at build lock key performance [incubator-seata-go]
Posted by "Code-Fight (via GitHub)" <gi...@apache.org>.
Code-Fight merged PR #837:
URL: https://github.com/apache/incubator-seata-go/pull/837
--
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] Optimize/at build lock key performance [incubator-seata-go]
Posted by "MinatoWu (via GitHub)" <gi...@apache.org>.
MinatoWu commented on code in PR #837:
URL: https://github.com/apache/incubator-seata-go/pull/837#discussion_r2152143694
##########
pkg/datasource/sql/exec/at/base_executor.go:
##########
@@ -359,37 +358,48 @@ func (b *baseExecutor) buildPKParams(rows []types.RowImage, pkNameList []string)
// the string as local key. the local key example(multi pk): "t_user:1_a,2_b"
func (b *baseExecutor) buildLockKey(records *types.RecordImage, meta types.TableMeta) string {
- var (
- lockKeys bytes.Buffer
- filedSequence int
- )
+ var lockKeys strings.Builder
Review Comment:
Encapsulated in util package
--
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] Optimize/at build lock key performance [incubator-seata-go]
Posted by "baerwang (via GitHub)" <gi...@apache.org>.
baerwang commented on code in PR #837:
URL: https://github.com/apache/incubator-seata-go/pull/837#discussion_r2152071154
##########
pkg/datasource/sql/exec/at/base_executor.go:
##########
@@ -359,37 +358,48 @@ func (b *baseExecutor) buildPKParams(rows []types.RowImage, pkNameList []string)
// the string as local key. the local key example(multi pk): "t_user:1_a,2_b"
func (b *baseExecutor) buildLockKey(records *types.RecordImage, meta types.TableMeta) string {
- var (
- lockKeys bytes.Buffer
- filedSequence int
- )
+ var lockKeys strings.Builder
Review Comment:
the code some to be repetitive,can it be encapsulated?
--
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] Optimize/at build lock key performance [incubator-seata-go]
Posted by "lxfeng1997 (via GitHub)" <gi...@apache.org>.
lxfeng1997 commented on PR #837:
URL: https://github.com/apache/incubator-seata-go/pull/837#issuecomment-2970674296
LGTM
--
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