Skip to content

Commit

Permalink
info: increase delay between messages
Browse files Browse the repository at this point in the history
Motivation:
Commit 9317083 decreased the delay between messages sent by info dramatically. This also affects the time when a dga should next be triggered. Some time after the patch was committed, reports started popping up that were complaining about the info log being spammed by messages of the form "DGA {...} triggering too quickly", affecting classes inheriting from `SkelListBasedActivity`.

Modification:
Increase the `SUCCESSIVE_MSG_DELAY` periods again to the values they had before the mentioned commit.

Result:
Hopefully less info log spamming due to "DGA {...} triggering too quickly".

Target: master
Request: 8.1
Request: 8.0
Request: 7.2
Request: 7.1
Request: 7.0
Request: 6.2
Fixes: #1970
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/13569/
Acked-by: Albert Rossi
  • Loading branch information
lemora committed Jun 2, 2022
1 parent d6c908c commit 6910042
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -95,7 +95,7 @@ private void updateNextTrigger() {
} else {
// Safety! Check we wont trigger too quickly
if (nextTrigger.getTime() - System.currentTimeMillis() < MINIMUM_DGA_DELAY) {
LOGGER_RA.warn("DGA {} triggering too quickly ({}ms): engaging safety.",
LOGGER_RA.info("DGA {} triggering too quickly ({}ms): engaging safety.",
_dga, nextTrigger.getTime() - System.currentTimeMillis());
nextTrigger = new Date(System.currentTimeMillis() + MINIMUM_DGA_DELAY);
}
Expand Down
Expand Up @@ -42,7 +42,7 @@ public abstract class SkelListBasedActivity implements Schedulable {
/**
* Time between sending successive messages, in milliseconds
*/
private static final int SUCCESSIVE_MSG_DELAY = 100;
private static final int SUCCESSIVE_MSG_DELAY = 10000;

/**
* For how long should the resulting metrics live? (in seconds)
Expand Down
Expand Up @@ -21,7 +21,7 @@ public class CellInfoDga extends SkelListBasedActivity {
* requests of information from any domain.
*/
private static int MIN_LIST_REFRESH_PERIOD = 120000;
private static int SUCC_MSG_DELAY = 100;
private static int SUCC_MSG_DELAY = 2000;

private final CellMessageAnswerable _handler;

Expand Down
Expand Up @@ -28,7 +28,7 @@ public class StaticDomainDga extends SkelListBasedActivity {
* 100 ms between successive requests of information from any domain.
*/
private static final int MIN_LIST_REFRESH_PERIOD = 120000;
private static final int SUCC_MSG_DELAY = 100;
private static final int SUCC_MSG_DELAY = 2000;

public StaticDomainDga(StateExhibitor exhibitor, MessageSender sender,
CellMessageAnswerable handler) {
Expand Down
Expand Up @@ -30,7 +30,7 @@ public class RoutingMgrDga extends SkelListBasedActivity {
* information from any domain.
*/
private static int MIN_LIST_REFRESH_PERIOD = 300000;
private static int SUCC_MSG_DELAY = 100;
private static int SUCC_MSG_DELAY = 5000;

private final CellMessageAnswerable _handler;

Expand Down

0 comments on commit 6910042

Please sign in to comment.