You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "zihenzzz (via GitHub)" <gi...@apache.org> on 2026/04/15 07:51:00 UTC
[PR] feature: add SAGA_ANNOTATION mode to benchmark CLI [incubator-seata]
zihenzzz opened a new pull request, #8052:
URL: https://github.com/apache/incubator-seata/pull/8052
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines.
- [ ] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
### Ⅰ. Describe what this PR did
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
fix https://github.com/apache/incubator-seata/issues/8040
### Ⅲ. Why don't you add test cases (unit test/integration test)?
### Ⅳ. Describe how to verify it
### Ⅴ. Special notes for reviews
--
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] feature: add SAGA_ANNOTATION mode to benchmark CLI [incubator-seata]
Posted by "WangzJi (via GitHub)" <gi...@apache.org>.
WangzJi commented on code in PR #8052:
URL: https://github.com/apache/incubator-seata/pull/8052#discussion_r3091821511
##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/saga/annotation/BenchmarkCompensatableService.java:
##########
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.benchmark.saga.annotation;
+
+import org.apache.seata.rm.tcc.api.BusinessActionContext;
+import org.apache.seata.saga.rm.api.CompensationBusinessAction;
+import org.apache.seata.saga.rm.api.SagaTransactional;
+
+/**
+ * Benchmark service interface for SAGA_ANNOTATION mode.
+ *
+ * @author zihenzzz
Review Comment:
The @author tag in class Javadoc is not needed. Could you remove it?
##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/config/BenchmarkConfig.java:
##########
@@ -195,8 +195,12 @@ public void validate() {
}
private void validateMode() {
- if (mode != BranchType.AT && mode != BranchType.TCC && mode != BranchType.SAGA) {
- throw new IllegalArgumentException("Unsupported mode: " + mode + ". Only AT, TCC, and SAGA are supported.");
+ if (mode != BranchType.AT
Review Comment:
How about using an EnumSet instead?
##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/saga/annotation/BenchmarkCompensatableServiceImpl.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seata.benchmark.saga.annotation;
+
+import org.apache.seata.rm.tcc.api.BusinessActionContext;
+
+/**
+ * Benchmark implementation of {@link BenchmarkCompensatableService}.
+ *
+ * @author zihenzzz
Review Comment:
Ditto.
--
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] feature: add SAGA_ANNOTATION mode to benchmark CLI [incubator-seata]
Posted by "WangzJi (via GitHub)" <gi...@apache.org>.
WangzJi merged PR #8052:
URL: https://github.com/apache/incubator-seata/pull/8052
--
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] feature: add SAGA_ANNOTATION mode to benchmark CLI [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8052:
URL: https://github.com/apache/incubator-seata/pull/8052#issuecomment-4251982631
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/8052?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 72.14%. Comparing base ([`1adb847`](https://app.codecov.io/gh/apache/incubator-seata/commit/1adb847e6f722a1fc0e0259f7f68fbb5c5aa1ea6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1082614`](https://app.codecov.io/gh/apache/incubator-seata/commit/10826148787f414202c9fb8ba7768ff5981b489b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 2.x #8052 +/- ##
============================================
+ Coverage 72.10% 72.14% +0.03%
- Complexity 872 873 +1
============================================
Files 1320 1320
Lines 50545 50545
Branches 6026 6026
============================================
+ Hits 36446 36465 +19
+ Misses 11109 11093 -16
+ Partials 2990 2987 -3
```
[see 13 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/8052/indirect-changes?src=pr&el=tree-more&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/8052?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</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