Skip to content

Commit

Permalink
rscgrp-spawn: prevent spawn from committing rscdef/voldef
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed Jan 12, 2021
1 parent badba82 commit f65c4e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ public ApiCallRc createResourceDefinition(
peerSlotsRef,
rscGrpNameRef,
false,
apiCallRc
apiCallRc,
true
);
}
return apiCallRc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public ResourceDefinition createResourceDefinition(
Short peerSlotsRef,
String rscGrpNameStr,
boolean throwOnError,
ApiCallRcImpl apiCallRc
ApiCallRcImpl apiCallRc,
boolean commit
)
{
ApiCallRcImpl responses = new ApiCallRcImpl();
Expand Down Expand Up @@ -228,7 +229,10 @@ public ResourceDefinition createResourceDefinition(

resourceDefinitionRepository.put(apiCtx, rscDfn);

ctrlTransactionHelper.commit();
if (commit)
{
ctrlTransactionHelper.commit();
}

for (VolumeDefinition vlmDfn : createdVlmDfns)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,8 @@ private Flux<ApiCallRc> spawnInTransaction(
null,
rscGrpNameRef,
true,
apiCallRc
apiCallRc,
definitionsOnlyRef
);

if (autoPlaceConfig != null && autoPlaceConfig.getReplicaCount() != null && !definitionsOnlyRef)
Expand Down

0 comments on commit f65c4e8

Please sign in to comment.