sashapolo commented on code in PR #677:
URL: https://github.com/apache/ignite-3/pull/677#discussion_r855344274
##########
modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/LocalConfigurationStorage.java:
##########
@@ -65,58 +74,60 @@ public LocalConfigurationStorage(VaultManager vaultMgr) {
this.vaultMgr = vaultMgr;
}
+ @Override
+ public void close() throws Exception {
+ IgniteUtils.shutdownAndAwaitTermination(threadPool, 10,
TimeUnit.SECONDS);
+ }
+
/** {@inheritDoc} */
@Override
- public synchronized Map<String, ? extends Serializable>
readAllLatest(String prefix) {
+ public CompletableFuture<Map<String, ? extends Serializable>>
readAllLatest(String prefix) {
var rangeStart = new ByteArray(LOC_PREFIX + prefix);
var rangeEnd = new ByteArray(incrementLastChar(LOC_PREFIX + prefix));
- return readAll(rangeStart, rangeEnd).values();
+ return readAll(rangeStart, rangeEnd).thenApply(Data::values);
}
/** {@inheritDoc} */
@Override
- public synchronized Serializable readLatest(String key) throws
StorageException {
- try {
- VaultEntry vaultEntry = vaultMgr.get(new ByteArray(LOC_PREFIX +
key)).join();
-
- return vaultEntry.empty() ? null :
ConfigurationSerializationUtil.fromBytes(vaultEntry.value());
- } catch (Exception e) {
- throw new StorageException("Exception while reading vault entry",
e);
Review Comment:
I'm pretty sure that nobody cares, but I will bring it back
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]