Skip to content

[ISSUE #9320]Fix extra put when checkImmunityTime exceeds the maximum check time range #9473

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

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

WJ66880
Copy link
Contributor

@WJ66880 WJ66880 commented Jun 13, 2025

… check time range

Which Issue(s) This PR Fixes

Fixes #9320

Brief Description

How Did You Test This Change?

Send a transaciton message with property CHECK_IMMUNITY_TIME_IN_SECONDS 1800

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 47.98%. Comparing base (53a3f69) to head (0b6f91c).

Files with missing lines Patch % Lines
...saction/queue/TransactionalMessageServiceImpl.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9473      +/-   ##
=============================================
- Coverage      48.14%   47.98%   -0.17%     
+ Complexity     12022    11983      -39     
=============================================
  Files           1308     1308              
  Lines          92253    92261       +8     
  Branches       11808    11809       +1     
=============================================
- Hits           44413    44268     -145     
- Misses         42352    42488     +136     
- Partials        5488     5505      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lizhimins
Copy link
Member

Please rebase develop branch due to another pr has been merge

WJ66880 and others added 10 commits July 1, 2025 10:04
Co-authored-by: hqbfzwang <hqbfzwang@tencent.com>
…ultiple protocols dynamic loading (apache#9483)

* feat(proxy): 添加 gRPC 和 Remoting 服务器的 TLS 证书热更新支持

- 在 GrpcServer 和 RemotingProtocolServer 中添加文件监视服务,用于监控 TLS 证书和密钥的变化
- 实现证书和密钥变更时重新加载 SSL 上下文的逻辑
- 优化 ProxyAndTlsProtocolNegotiator 中的 SSL 上下文加载过程
- 添加日志记录,方便调试和监控 TLS 相关操作

* refactor(proxy): 重构 gRPC 证书监控逻辑并添加单元测试

- 重构 GrpcServer 中的证书监控逻辑,提取到独立的 GrpcCertKeyFileWatchListener 类中
- 优化证书变更处理流程,提高代码可读性和维护性
- 新增 GrpcServerTest 类,为 gRPC服务器和证书监控添加单元测试- 测试覆盖了各种证书变更场景,包括单独变更和组合变更
- 验证了证书变更时 SSLContext 的重新加载和错误处理

Signed-off-by: Async <raisinata@foxmail.com>

* refactor(proxy): 重构 gRPC 证书监控逻辑并添加单元测试

- 重构 GrpcServer 中的证书监控逻辑,提取到独立的 GrpcCertKeyFileWatchListener 类中
- 优化证书变更处理流程,提高代码可读性和维护性
- 新增 GrpcServerTest 类,为 gRPC服务器和证书监控添加单元测试- 测试覆盖了各种证书变更场景,包括单独变更和组合变更
- 验证了证书变更时 SSLContext 的重新加载和错误处理

Signed-off-by: Async <raisinata@foxmail.com>

* fix: code format

Signed-off-by: Async <raisinata@foxmail.com>

* test: add test cases

Signed-off-by: Async <raisinata@foxmail.com>

* fix: code format

Signed-off-by: Async <raisinata@foxmail.com>

* refactor(proxy): 重构 TLS证书更新逻辑

- 移除 FileWatchService,改用 TlsCertificateManager 统一管理 TLS证书
- 实现 TlsContextReloadListener 接口,响应 TLS 证书更新
- 优化 GrpcServer 和 RemotingProtocolServer 中的 TLS 证书更新逻辑
- 新增单元测试验证 TLS 证书更新功能

Signed-off-by: Async <raisinata@foxmail.com>

* test(proxy): 优化 TLS 相关测试用例

- 重构了多个测试类中的重复代码- 提高了测试的可读性和维护性
- 确保在测试中正确关闭资源

Signed-off-by: Async <raisinata@foxmail.com>

* refactor(proxy): 优化代码导入结构

- 移除了不必要的导入项
- 显式导入了所有活动类,提高了代码的可读性和维护性

Signed-off-by: Async <raisinata@foxmail.com>

* update

* fix: no static

Signed-off-by: Async <raisinata@foxmail.com>

* fix: add SingletonHolder for TlsCertificateManager

Signed-off-by: Async <raisinata@foxmail.com>

* refactor

* refactor(proxy): 重构 TLS证书管理

- 将 TlsCertificateManager 实例化移至 ProxyStartup 类
- 更新 GrpcServer 和 RemotingProtocolServer 类以使用 TlsCertificateManager
- 移除冗余的 TLS 证书管理相关测试用例
- 优化 TLS 上下文重载逻辑

Signed-off-by: Async <raisinata@foxmail.com>

* refactor(proxy): 优化日志信息内容

- 将 cert file changed 日志信息改为更通用的 File changed
- 保持代码风格一致性,提高日志的可读性和维护性

Signed-off-by: Async <raisinata@foxmail.com>

* test(proxy): 重构并增强 TlsCertificateManager 测试用例- 重新设计测试用例,使用临时文件模拟证书和密钥
- 增加对 TlsCertificateManager 各种方法的单元测试
- 涉及到的测试场景包括:
  - 构造函数
  - 启动和关闭
  - 注册和注销监听器
  - 文件变更通知(证书、密钥、未知文件等)
  - 多个监听器的情况
  - 监听器抛出异常的情况
  - 增加对内部 CertKeyFileWatchListener 的测试

Signed-off-by: Async <raisinata@foxmail.com>

* refactor

* test(proxy): 优化 TlsCertificateManager 单元测试

-移除了未使用的 import 语句
- 替换了 import static语句,使其更加有序
- 删除了未使用的静态方法断言(verify、times、never)
- 重置了 mock 对象以避免测试之间的干扰

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

* fix format

Signed-off-by: Async <raisinata@foxmail.com>

---------

Signed-off-by: Async <raisinata@foxmail.com>
…bles requestsWrite and requestsRead in the GroupCommitService class (apache#9492)
…geTime when running in IPv6 environment (apache#9498)

Co-authored-by: shixiaoxiao <shixiaoxiao@bytedance.com>
…eckListener#toMessageExtBrokerInner to improve performance (apache#9477)
@WJ66880
Copy link
Contributor Author

WJ66880 commented Jul 1, 2025

Please rebase develop branch due to another pr has been merge

rebase done
0ae68789f80de7e6009ea4ecfb514c0

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

Successfully merging this pull request may close these issues.

[Enhancement] Ignore extra put when checkImmunityTime exceeds the maximum check time range
10 participants