Skip to content

Fix logs mismatch between Network GC wait and interval #10776

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 5 commits into
base: 4.20
Choose a base branch
from

Conversation

andrijapanicsb
Copy link
Contributor

Logs:

2025-04-24 19:04:20,912 INFO [o.a.c.e.o.NetworkOrchestrator] (Network-Scavenger-1:ctx-34a60b9f) (logid:ab827a5e) NetworkGarbageCollector uses '121' seconds for GC interval.
^C

Actual values (with mgmt server restart done after the value changes):

image

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 16.12%. Comparing base (12c077d) to head (e1025a9).
Report is 9 commits behind head on 4.20.

Files with missing lines Patch % Lines
...tack/engine/orchestration/NetworkOrchestrator.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #10776   +/-   ##
=========================================
  Coverage     16.12%   16.12%           
- Complexity    13210    13212    +2     
=========================================
  Files          5652     5652           
  Lines        496467   496468    +1     
  Branches      60120    60120           
=========================================
+ Hits          80044    80071   +27     
+ Misses       407515   407483   -32     
- Partials       8908     8914    +6     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 16.97% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

logger.info("NetworkGarbageCollector uses '{}' seconds for GC interval.", netGcWait);
final int netGcInterval = NumbersUtil.parseInt(_configDao.getValue(NetworkGcInterval.key()), 60);
logger.info("NetworkGarbageCollector uses '{}' seconds for GC wait.", netGcWait);
logger.info("NetworkGarbageCollector uses '{}' seconds for GC interval.", netGcInterval);
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps these 2 lines can be unified into a single one: NetworkGarbageCollector uses '{}' seconds for GC wait and '{}' seconds for GC interval.

andrijapanicsb and others added 3 commits April 25, 2025 06:56
Update dynamic setting for the network.gc.intervla and the wrong message for wait period.
network.gc.value was mistakenly obtained from network.gc.wait
added messages for both gc.wait and gc.internval.
@nvazquez nvazquez force-pushed the network-gc-wait-dynamic branch from ee5c057 to e0e9d64 Compare April 25, 2025 09:58
@nvazquez nvazquez changed the base branch from main to 4.20 April 25, 2025 09:58
@nvazquez nvazquez changed the title Network gc wait dynamic Fix logs mismatch between Network GC wait and interval Apr 25, 2025
@nvazquez
Copy link
Contributor

@blueorangutan package

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

@@ -3556,7 +3556,8 @@ public void reallyRun() {

final List<Long> networkIds = _networksDao.findNetworksToGarbageCollect();
final int netGcWait = NumbersUtil.parseInt(_configDao.getValue(NetworkGcWait.key()), 60);
logger.info("NetworkGarbageCollector uses '{}' seconds for GC interval.", netGcWait);
final int netGcInterval = NumbersUtil.parseInt(_configDao.getValue(NetworkGcInterval.key()), 60);
Copy link
Member

Choose a reason for hiding this comment

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

Is the purpose to only log it, why not use the ConfigKey read the value, than use the ConfigDao?

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
final int netGcInterval = NumbersUtil.parseInt(_configDao.getValue(NetworkGcInterval.key()), 60);
final int netGcInterval = NumbersUtil.parseInt(NetworkGcInterval.value()), 60);

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.

5 participants