Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hui-cha
Copy link
Collaborator

@hui-cha hui-cha commented Jan 13, 2026

remove useless log in com.alipay.sofa.registry.server.session.push.FirePushService#fireOnChange

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated project version to 6.6.2-log-opt across all modules
    • Code refactoring and cleanup including import optimization and logging improvements

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

The pull request updates the Maven project version from 6.6.2-release to 6.6.2-log-opt across all POM files in the module hierarchy. Additionally, several test and source files undergo minor import statement reorganization, and one logging statement changes from error to debug level.

Changes

Cohort / File(s) Summary
POM Parent Version Updates
pom.xml, client/pom.xml, client/all/pom.xml, client/api/pom.xml, client/impl/pom.xml, client/log/pom.xml, core/pom.xml, server/pom.xml, server/common/pom.xml, server/common/model/pom.xml, server/common/util/pom.xml, server/distribution/pom.xml, server/distribution/all/pom.xml, server/remoting/pom.xml, server/remoting/api/pom.xml, server/remoting/bolt/pom.xml, server/remoting/http/pom.xml, server/server/pom.xml, server/server/shared/pom.xml, server/server/data/pom.xml, server/server/integration/pom.xml, server/server/meta/pom.xml, server/server/session/pom.xml, server/store/pom.xml, server/store/api/pom.xml, server/store/jdbc/pom.xml, server/store/jraft/pom.xml, test/pom.xml
Updated parent and project version elements from 6.6.2-release to 6.6.2-log-opt across all modules.
Session Module Source Import Reorganization
server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchClientOffAddressService.java, server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListService.java, server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/AbstractDataManager.java, server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/DataIndexer.java
Reorganized and consolidated import statements; removed duplicate imports and adjusted grouping order.
Session Module Logging Level Change
server/server/session/src/main/java/com/alipay/sofa/registry/server/session/push/FirePushService.java
Changed failure log level in fireOnChange from error to debug when changeProcessor.fireChange fails.
Session Module Test Import Reorganization
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/connections/ConnectionsServiceTest.java, server/server/session/src/test/java/com/alipay/sofa/registry/server/session/converter/pb/BoltEncodeTest.java, server/server/session/src/test/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListServiceTest.java, server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/DataCacheTest.java, server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionDataStoreTest.java, server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionInterestsTest.java
Reorganized import statements and minor formatting adjustments; no functional logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

size/M

Suggested reviewers

  • NickNYU

Poem

🐰 A hop through versions, hop we go,
From release to log-opt, steal the show!
Imports tidy, logging bright,
All in line, all just right! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions 'remove unused logs in 6.6.2-log-clean release' but the changeset updates version to '6.6.2-log-opt' and contains extensive version updates across 30+ POM files alongside minor log/import changes. Update the title to accurately reflect the main change: either focus on the version bump to 6.6.2-log-opt, or clarify that this is a maintenance release with version and log level adjustments.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionInterestsTest.java (1)

27-28: Import reorganization looks fine.

The changes are purely cosmetic. The explicit Map.Entry import on line 28 is necessary since wildcard imports don't cover nested types, and Entry is used unqualified at lines 119 and 125.

As a minor style note: wildcard imports (java.util.*) are generally discouraged in favor of explicit imports for better clarity and to avoid potential naming conflicts, but this is a test file and not a blocking concern.

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/AbstractDataManager.java (1)

28-29: Inconsistency between PR objectives and actual changes.

The PR description states the objective is to remove a log statement from FirePushService#fireOnChange, but this file (AbstractDataManager.java) contains only import reorganization with no log-related changes.

Additionally, the wildcard import on line 28 (import java.util.*;) is generally discouraged in Java best practices. Consider using explicit imports instead to improve code clarity and avoid potential namespace conflicts.

♻️ Suggested refactoring to explicit imports
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.function.BiConsumer;
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListServiceTest.java (1)

19-22: Consider updating deprecated Mockito API.

The import reorganization looks fine. However, org.mockito.Matchers is deprecated in favor of org.mockito.ArgumentMatchers. Consider updating the imports:

-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionDataStoreTest.java (1)

30-31: Consider using explicit imports instead of wildcards.

Wildcard imports (java.util.*, java.util.concurrent.*) can reduce code clarity and may cause naming conflicts. While acceptable in test code, explicit imports are generally preferred for maintainability.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c08ab3d and d73161f.

📒 Files selected for processing (39)
  • client/all/pom.xml
  • client/api/pom.xml
  • client/impl/pom.xml
  • client/log/pom.xml
  • client/pom.xml
  • core/pom.xml
  • pom.xml
  • server/common/model/pom.xml
  • server/common/pom.xml
  • server/common/util/pom.xml
  • server/distribution/all/pom.xml
  • server/distribution/pom.xml
  • server/pom.xml
  • server/remoting/api/pom.xml
  • server/remoting/bolt/pom.xml
  • server/remoting/http/pom.xml
  • server/remoting/pom.xml
  • server/server/data/pom.xml
  • server/server/integration/pom.xml
  • server/server/meta/pom.xml
  • server/server/pom.xml
  • server/server/session/pom.xml
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchClientOffAddressService.java
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListService.java
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/push/FirePushService.java
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/AbstractDataManager.java
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/DataIndexer.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/connections/ConnectionsServiceTest.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/converter/pb/BoltEncodeTest.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListServiceTest.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/DataCacheTest.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionDataStoreTest.java
  • server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionInterestsTest.java
  • server/server/shared/pom.xml
  • server/store/api/pom.xml
  • server/store/jdbc/pom.xml
  • server/store/jraft/pom.xml
  • server/store/pom.xml
  • test/pom.xml
💤 Files with no reviewable changes (1)
  • server/server/session/src/main/java/com/alipay/sofa/registry/server/session/store/DataIndexer.java
🧰 Additional context used
🧬 Code graph analysis (4)
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionDataStoreTest.java (1)
server/common/util/src/main/java/com/alipay/sofa/registry/util/ConcurrentUtils.java (1)
  • ConcurrentUtils (34-122)
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/DataCacheTest.java (4)
server/common/model/src/main/java/com/alipay/sofa/registry/common/model/store/DataInfo.java (1)
  • DataInfo (29-180)
server/common/model/src/main/java/com/alipay/sofa/registry/common/model/ConnectId.java (1)
  • ConnectId (31-151)
server/common/util/src/main/java/com/alipay/sofa/registry/net/NetUtil.java (1)
  • NetUtil (42-228)
server/common/model/src/main/java/com/alipay/sofa/registry/common/model/constants/ValueConstants.java (1)
  • ValueConstants (26-200)
server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchClientOffAddressService.java (2)
server/common/model/src/main/java/com/alipay/sofa/registry/common/model/constants/ValueConstants.java (1)
  • ValueConstants (26-200)
server/server/session/src/main/java/com/alipay/sofa/registry/server/session/registry/ClientManagerMetric.java (1)
  • ClientManagerMetric (27-58)
server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListService.java (1)
server/common/util/src/main/java/com/alipay/sofa/registry/util/CollectionUtils.java (1)
  • CollectionUtils (31-76)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build
  • GitHub Check: build
  • GitHub Check: build
🔇 Additional comments (40)
server/server/session/src/test/java/com/alipay/sofa/registry/server/session/converter/pb/BoltEncodeTest.java (1)

38-46: LGTM! Non-functional import reordering.

The import statements have been reorganized without any functional impact on the test logic.

server/common/model/pom.xml (1)

8-8: Version string inconsistency with PR title.

The parent version is updated to 6.6.2-log-opt, but the PR title references 6.6.2-log-clean. Please verify the intended version string is correct and update the PR title if needed for consistency.

client/impl/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the repo-wide version bump.

server/store/pom.xml (1)

8-8: LGTM!

Parent version update aligns with the project-wide version bump to 6.6.2-log-opt.

test/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the repo-wide version bump.

client/api/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the repo-wide version bump.

pom.xml (1)

9-9: Version naming inconsistency with PR title.

The PR title references "6.6.2-log-clean" but the version in code is 6.6.2-log-opt. Please verify this is intentional and update the PR title/description if needed to avoid confusion.

server/server/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the root POM.

client/log/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the root POM.

server/server/data/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the root POM.

server/remoting/http/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the root POM.

client/all/pom.xml (1)

9-9: Version bump looks consistent across the module hierarchy.

The version update to 6.6.2-log-opt aligns with the coordinated version change across all POM files in this PR.

server/server/session/src/test/java/com/alipay/sofa/registry/server/session/connections/ConnectionsServiceTest.java (1)

30-30: Formatting and import cleanup looks fine.

The java.util.List import is used on line 68, and the assertion reformatting is purely cosmetic with no functional impact.

Also applies to: 56-57, 66-66

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/push/FirePushService.java (1)

104-105: Verify that debug level is appropriate for production observability.

Downgrading from error to debug means this log won't appear in typical production log configurations. Since the method returns true regardless of whether fireChange succeeds (line 108), this appears to be a non-critical path, but consider using warn level instead if these failures should be visible for operational monitoring without enabling debug logs.

server/remoting/api/pom.xml (1)

8-8: Parent version update is consistent.

server/common/pom.xml (1)

8-8: Parent version update is consistent.

server/server/session/pom.xml (1)

5-10: LGTM!

The parent version bump to 6.6.2-log-opt is consistent with the project-wide version update.

server/remoting/pom.xml (1)

5-10: LGTM!

The parent version bump to 6.6.2-log-opt aligns with the project-wide version update.

server/server/session/src/test/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListServiceTest.java (1)

38-40: LGTM!

Standard import reorganization with no functional impact.

server/store/api/pom.xml (1)

5-10: LGTM!

The parent version bump to 6.6.2-log-opt is consistent with the project-wide version update.

server/store/jdbc/pom.xml (1)

6-11: LGTM!

The parent version bump to 6.6.2-log-opt aligns with the project-wide version update.

client/pom.xml (1)

10-10: LGTM!

Parent version update to 6.6.2-log-opt is consistent with the repository-wide version bump in this PR.

server/server/integration/pom.xml (1)

8-8: LGTM!

Parent version update to 6.6.2-log-opt aligns with the repository-wide version change.

core/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the repository-wide version bump.

server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/DataCacheTest.java (4)

19-20: LGTM!

Wildcard static import for Mockito is appropriate here since the test uses multiple Mockito methods (mock, doReturn, when, anyString).


40-41: LGTM!

Import organization is clean.


70-71: Formatting changes look good.

These are purely whitespace/line-break adjustments to method call chains with no functional impact.

Also applies to: 77-78, 87-88, 110-111, 116-117, 123-124, 191-195, 198-199


336-346: Formatting consistency maintained.

The multi-line formatting for queryByConnectId assertions is consistently applied across all test methods.

Also applies to: 369-378, 418-429, 454-463, 494-505, 526-535, 573-596

server/store/jraft/pom.xml (1)

9-9: LGTM!

Parent version update to 6.6.2-log-opt is consistent with the repository-wide version change.

server/server/session/src/test/java/com/alipay/sofa/registry/server/session/store/SessionDataStoreTest.java (1)

36-261: LGTM!

The test logic remains unchanged. The formatting adjustments (line wrapping for lambdas, method calls, and constructors) improve readability without affecting functionality.

server/server/meta/pom.xml (1)

5-10: Verify the version naming convention.

The PR title mentions 6.6.2-log-clean release, but the version is set to 6.6.2-log-opt. Please confirm this is the intended version string.

server/pom.xml (1)

7-12: LGTM!

Parent version update to 6.6.2-log-opt is consistent with the project-wide version bump.

server/remoting/bolt/pom.xml (1)

5-10: LGTM!

Parent version update aligns with the repository-wide version bump to 6.6.2-log-opt.

server/common/util/pom.xml (1)

5-10: LGTM!

Parent version update to 6.6.2-log-opt is consistent with the project-wide version bump.

server/server/shared/pom.xml (1)

8-8: Verify version string consistency with PR title.

The parent version is updated to 6.6.2-log-opt, but the PR title mentions 6.6.2-log-clean. Please confirm this is the intended version string.

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchClientOffAddressService.java (2)

19-22: LGTM!

The static imports for CLIENT_OFF, ADDRESS_LOAD_DELAY_HISTOGRAM, and CLIENT_OFF_GAUGE are all used throughout the file (lines 87, 162, 263, 268, 311), improving code readability. The ValueConstants class import is retained correctly as it's still needed for CLIENT_OFF_ADDRESS_DATA_ID at line 80.


54-56: Import reordering acknowledged.

Minor import reorganization with no functional impact.

server/distribution/all/pom.xml (1)

8-8: LGTM!

Parent version update is consistent with the project-wide version bump.

server/distribution/pom.xml (1)

9-9: LGTM!

Parent version update is consistent with the project-wide version bump.

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/providedata/FetchDataInfoIDBlackListService.java (1)

43-44: LGTM! Import reordering has no functional impact.

The import statements have been reordered with no changes to the actual code logic. Both CollectionUtils (used on lines 121, 140) and @Autowired (used on lines 56, 58, 60) are correctly imported and utilized.

@huanglongchao
Copy link
Contributor

LGTM

@huanglongchao huanglongchao merged commit c661da5 into sofastack:master Jan 13, 2026
5 checks passed
@hui-cha hui-cha deleted the feature/remove_useless_log branch January 15, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants