| 75 | } |
| 76 | |
| 77 | ACTOR Future<bool> ClusterConnectionKey::upToDateImpl(Reference<ClusterConnectionKey> self, |
| 78 | ClusterConnectionString* connectionString) { |
| 79 | try { |
| 80 | // the cluster file hasn't been created yet so there's nothing to check |
| 81 | if (self->needsToBePersisted()) |
| 82 | return true; |
| 83 | |
| 84 | Reference<ClusterConnectionKey> temp = |
| 85 | wait(ClusterConnectionKey::loadClusterConnectionKey(self->db, self->connectionStringKey)); |
| 86 | *connectionString = temp->getConnectionString(); |
| 87 | return connectionString->toString() == self->cs.toString(); |
| 88 | } catch (Error& e) { |
| 89 | TraceEvent(SevWarnAlways, "ClusterKeyError").error(e).detail("Key", self->connectionStringKey); |
| 90 | return false; // Swallow the error and report that the file is out of date |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | // Checks whether the connection string in the database matches the connection string stored in memory. The cluster |
| 95 | // string stored in the database is returned via the reference parameter connectionString. |
nothing calls this directly
no test coverage detected