| 827 | } |
| 828 | |
| 829 | Future<Void> coordChangeClusterKey(std::string dataFolder, KeyRef newClusterKey, KeyRef oldClusterKey) { |
| 830 | TraceEvent(SevInfo, "CoordChangeClusterKey") |
| 831 | .detail("DataFolder", dataFolder) |
| 832 | .detail("NewClusterKey", newClusterKey) |
| 833 | .detail("OldClusterKey", oldClusterKey); |
| 834 | std::string absDataFolder = abspath(dataFolder); |
| 835 | std::vector<std::string> returnList = platform::listDirectories(absDataFolder); |
| 836 | std::vector<Future<Void>> futures; |
| 837 | for (const auto& dirEntry : returnList) { |
| 838 | if (dirEntry == "." || dirEntry == "..") { |
| 839 | continue; |
| 840 | } |
| 841 | std::string processDir = dataFolder + "/" + dirEntry; |
| 842 | TraceEvent(SevInfo, "UpdatingCoordDataForProcess").detail("ProcessDataDir", processDir); |
| 843 | std::vector<std::string> returnFiles = platform::listFiles(processDir, ""); |
| 844 | bool isCoord = false; |
| 845 | for (const auto& fileEntry : returnFiles) { |
| 846 | if (fileEntry.rfind("coordination-", 0) == 0) { |
| 847 | isCoord = true; |
| 848 | } |
| 849 | } |
| 850 | if (!isCoord) |
| 851 | continue; |
| 852 | futures.push_back(changeClusterDescription(processDir, newClusterKey, oldClusterKey)); |
| 853 | } |
| 854 | return waitForAll(futures); |
| 855 | } |
no test coverage detected