aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/apps
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-05-22 12:42:07 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-05-22 12:42:07 +0000
commitedb06b01c1c81e333ac318265e2f88778d981a6c (patch)
tree16e9efe97c0689e592c28753de02944e6993fcc0 /searchcore/src/apps
parentb5eb310aa8a6cd8b44d73891d8064692dca7421a (diff)
Report min of service layer config generation and proton config generation
when reporting component config in service layer state server.
Diffstat (limited to 'searchcore/src/apps')
-rw-r--r--searchcore/src/apps/proton/proton.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp
index b24a94f0bea..4bb1eb69996 100644
--- a/searchcore/src/apps/proton/proton.cpp
+++ b/searchcore/src/apps/proton/proton.cpp
@@ -114,6 +114,7 @@ public:
// down component.
_metricManager = &mm;
}
+ virtual int64_t getGeneration() const override;
};
ProtonServiceLayerProcess::ProtonServiceLayerProcess(const config::ConfigUri &
@@ -151,6 +152,14 @@ ProtonServiceLayerProcess::getProvider()
return _downPersistence ? *_downPersistence : _proton.getPersistence();
}
+int64_t
+ProtonServiceLayerProcess::getGeneration() const
+{
+ int64_t slGen = storage::ServiceLayerProcess::getGeneration();
+ int64_t protonGen = _proton.getConfigGeneration();
+ return std::min(slGen, protonGen);
+}
+
int
App::Main()
{