aboutsummaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-06-20 10:45:33 +0200
committerHarald Musum <musum@yahoo-inc.com>2017-06-20 10:45:33 +0200
commite70e6cd4b18b8e67e4e634f397d4848be2901759 (patch)
tree8db01b7e7a1afa92cd274bdcb48b7589a7c898a0 /filedistribution
parent60162a9ca2efd83c95b5b06e2944e75c379c5223 (diff)
Remove unneded legacy code
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.cpp17
-rw-r--r--filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.h1
2 files changed, 0 insertions, 18 deletions
diff --git a/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.cpp b/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.cpp
index 78f5751b2ef..92777ef7b18 100644
--- a/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.cpp
+++ b/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.cpp
@@ -89,7 +89,6 @@ ZKFileDBModel::cleanDeployedFilesToDownload(
for (auto & host : allHosts) {
Path hostPath = _hostsPath / host;
try {
- removeLegacyDeployFileNodes(hostPath);
// If this host is NOT part of hosts to deploy to
if (toPreserve.find(host) == toPreserve.end()) {
removeDeployFileNodes(hostPath, appId);
@@ -138,22 +137,6 @@ ZKFileDBModel::removeNonApplicationFiles(const Path & hostPath, const std::strin
}
}
-
-void
-ZKFileDBModel::removeLegacyDeployFileNodes(const Path & hostPath)
-{
- std::vector<std::string> deployNodes = _zk->getChildren(hostPath);
- for (auto & deployNode : deployNodes) {
- Path deployNodePath = hostPath / deployNode;
- std::string applicationId(readApplicationId(*_zk, deployNodePath));
- size_t numParts = std::count(applicationId.begin(), applicationId.end(), ':');
- // If we have an id with 3 colons, it is a legacy id and can be deleted.
- if (numParts == 3) {
- _zk->remove(deployNodePath);
- }
- }
-}
-
void
ZKFileDBModel::removeDeployFileNodes(const Path & hostPath, const std::string& appId) {
std::vector<std::string> deployNodes = _zk->getChildren(hostPath);
diff --git a/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.h b/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.h
index 6216f6a54c2..4a89a9547a9 100644
--- a/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.h
+++ b/filedistribution/src/vespa/filedistribution/model/zkfiledbmodel.h
@@ -11,7 +11,6 @@ private:
const std::shared_ptr<ZKFacade> _zk;
char getProgress(const Path& path);
void removeDeployFileNodes(const Path& hostPath, const std::string& appId);
- void removeLegacyDeployFileNodes(const Path& hostPath);
bool canRemoveHost(const Path& hostPath, const std::string& appId);
public:
const static Path _root;