kgusakov commented on a change in pull request #157:
URL: https://github.com/apache/ignite-3/pull/157#discussion_r645703015
##########
File path:
modules/vault/src/main/java/org/apache/ignite/internal/vault/VaultManager.java
##########
@@ -171,6 +175,31 @@ public boolean bootstrapped() {
}
}
+ /**
+ * Persist node name to the vault.
+ *
+ * @param name Node name to persist.
+ * @return Future representing pending completion of the operation.
Couldn't be {@code null}.
+ */
+ @NotNull public CompletableFuture<Void> putName(@NotNull String name) {
+ return put(NODE_NAME, name.getBytes(StandardCharsets.UTF_8));
+ }
+
+ /**
+ * @return Node name, if was stored earlier.
+ * @throws IgniteInternalCheckedException If couldn't get node name from
the vault.
+ */
+ public String name() throws IgniteInternalCheckedException {
+ synchronized (mux) {
+ try {
+ return new String(vaultService.get(NODE_NAME).get().value());
Review comment:
Maybe, not sure too :) `appliedRevision` can have the same issue, maybe
we should fix it in the scope of another issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]