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: In raft mode, the service domain name is used as xid. The xid is too long and an error occurs in XA mode. #7082

Open
1 task
PeppaO opened this issue Dec 28, 2024 · 3 comments

Comments

@PeppaO
Copy link
Contributor

PeppaO commented Dec 28, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

这个错误在跑XA测试用例中也出现过,所以手动执行XA start测试,发现就是字符太长导致的。
image

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version): 1.8
  • Seata client/server version: 2.x
  • Database version: mysql 8.0.27
  • OS(e.g. uname -a):
  • Others:
@slievrly
Copy link
Member

slievrly commented Jan 2, 2025

@PeppaO Are you sure it's not a special character? This length limit is usually 132 characters, although it may vary depending on the version.

@PeppaO
Copy link
Contributor Author

PeppaO commented Jan 3, 2025

@PeppaO Are you sure it's not a special character? This length limit is usually 132 characters, although it may vary depending on the version.

error: xa start "seata-server-0.seata-svc-headless.default.svc.cluter.local:8091:8269208701573369857";
correct: xa start "s-0.svc-l.default.svc.cluster.local:8091:1784025255588331521";
I think its maximum length can be 64.

@funky-eyes
Copy link
Contributor

我认为应该将xa的xid设定为transactionId和branchid的组合,而不是xid和branchid,理论上transactionid和branchid都是唯一的,更加精简,也更合适作为xa xid。但是需要考虑如何向下兼容。
I believe the XA XID should be set as a combination of the transactionId and branchId, rather than the XID and branchId. In theory, both the transactionId and branchId are unique, making this combination more concise and better suited as the XA XID. However, it is necessary to consider how to maintain backward compatibility.
@slievrly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants