aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2022-01-25 14:41:35 +0100
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2022-01-25 14:42:45 +0100
commitd39c153e007d4b613ba7e4dbe3f222691861d1c8 (patch)
tree564cbe83ad8021807db872f70c5d6cb1b6f81e83 /container-disc/src/main/java/com/yahoo
parentd7616adac5ab388192acfea71625296295909ee2 (diff)
Include generation number in log message for deconstruction
Diffstat (limited to 'container-disc/src/main/java/com/yahoo')
-rw-r--r--container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
index ee592c2e8d1..336554b1b87 100644
--- a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
+++ b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
@@ -48,7 +48,7 @@ public class Deconstructor implements ComponentDeconstructor {
public Deconstructor() { this(Duration.ofSeconds(45)); }
@Override
- public void deconstruct(List<Object> components, Collection<Bundle> bundles) {
+ public void deconstruct(long generation, List<Object> components, Collection<Bundle> bundles) {
Collection<Deconstructable> destructibleComponents = new ArrayList<>();
for (var component : components) {
if (component instanceof AbstractComponent) {
@@ -64,7 +64,7 @@ public class Deconstructor implements ComponentDeconstructor {
}
}
if (!destructibleComponents.isEmpty() || !bundles.isEmpty()) {
- executor.execute(new DestructComponentTask(destructibleComponents, bundles));
+ executor.execute(new DestructComponentTask(generation, destructibleComponents, bundles));
}
}
@@ -93,10 +93,12 @@ public class Deconstructor implements ComponentDeconstructor {
private static class DestructComponentTask implements Runnable {
private final Random random = new Random(System.nanoTime());
+ private final long generation;
private final Collection<Deconstructable> components;
private final Collection<Bundle> bundles;
- DestructComponentTask(Collection<Deconstructable> components, Collection<Bundle> bundles) {
+ DestructComponentTask(long generation, Collection<Deconstructable> components, Collection<Bundle> bundles) {
+ this.generation = generation;
this.components = components;
this.bundles = bundles;
}
@@ -113,7 +115,8 @@ public class Deconstructor implements ComponentDeconstructor {
@Override
public void run() {
long start = System.currentTimeMillis();
- log.info(String.format("Starting deconstruction of %d old components from previous config generation", components.size()));
+ log.info(String.format("Starting deconstruction of %d old components from graph generation %d",
+ components.size(), generation));
for (var component : components) {
log.log(FINE, () -> "Starting deconstruction of " + component);
try {