NSAmelchev commented on code in PR #10082:
URL: https://github.com/apache/ignite/pull/10082#discussion_r898265883
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -1002,38 +1007,22 @@ private IgniteInternalFuture<Boolean> preload(UUID
reqId) {
if (opCtx0.stopChecker.getAsBoolean())
throw new
IgniteInterruptedException("Snapshot remote operation request cancelled.");
- if (t == null) {
- int grpId =
CU.cacheId(cacheGroupName(snpFile.getParentFile()));
- int partId = partId(snpFile.getName());
-
- PartitionRestoreFuture partFut =
F.find(allParts.get(grpId),
- null,
- new
IgnitePredicate<PartitionRestoreFuture>() {
- @Override public boolean
apply(PartitionRestoreFuture f) {
- return f.partId == partId;
- }
- });
+ if (t != null) {
+ opCtx0.errHnd.accept(t);
+ completeListExceptionally(rmtAwaitParts,
t);
- assert partFut != null :
snpFile.getAbsolutePath();
+ return;
+ }
- File tmpCacheDir =
formatTmpDirName(grpToDir.get(grpId));
+ int grpId =
tmpDirGroupId(snpFile.getParentFile());
Review Comment:
Done
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -621,10 +620,20 @@ private
IgniteInternalFuture<SnapshotRestoreOperationResponse> prepare(SnapshotO
* @param cacheDir Cache directory.
* @return Temporary directory.
*/
- private static File formatTmpDirName(File cacheDir) {
+ static File formatTmpDirName(File cacheDir) {
return new File(cacheDir.getParent(), TMP_CACHE_DIR_PREFIX +
cacheDir.getName());
}
+ /**
+ * @param tmpCacheDir Temporary cache directory.
+ * @return Cache or group id.
+ */
+ static int tmpDirGroupId(File tmpCacheDir) {
Review Comment:
Renamed
--
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]