Set complex assignment operations to READ_COMMITED to ensure consitent
updates. Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -134,7 +134,7 @@ public class DeploymentManagement {
|
|||||||
* {@link SoftwareModuleType} are not assigned as define by the
|
* {@link SoftwareModuleType} are not assigned as define by the
|
||||||
* {@link DistributionSetType}. *
|
* {@link DistributionSetType}. *
|
||||||
*/
|
*/
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@Modifying
|
@Modifying
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||||
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
||||||
@@ -168,7 +168,7 @@ public class DeploymentManagement {
|
|||||||
* {@link DistributionSetType}.
|
* {@link DistributionSetType}.
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||||
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
||||||
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
||||||
@@ -220,7 +220,7 @@ public class DeploymentManagement {
|
|||||||
* {@link DistributionSetType}.
|
* {@link DistributionSetType}.
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||||
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
||||||
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
||||||
@@ -253,7 +253,7 @@ public class DeploymentManagement {
|
|||||||
* {@link DistributionSetType}.
|
* {@link DistributionSetType}.
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY_AND_UPDATE_TARGET)
|
||||||
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
||||||
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
public DistributionSetAssignmentResult assignDistributionSet(@NotNull final Long dsID,
|
||||||
@@ -513,7 +513,7 @@ public class DeploymentManagement {
|
|||||||
* action
|
* action
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||||
public Action cancelAction(@NotNull final Action action, @NotNull final Target target) {
|
public Action cancelAction(@NotNull final Action action, @NotNull final Target target) {
|
||||||
LOG.debug("cancelAction({}, {})", action, target);
|
LOG.debug("cancelAction({}, {})", action, target);
|
||||||
@@ -570,7 +570,7 @@ public class DeploymentManagement {
|
|||||||
* in case the given action is not active
|
* in case the given action is not active
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||||
public Action forceQuitAction(@NotNull final Action action) {
|
public Action forceQuitAction(@NotNull final Action action) {
|
||||||
final Action mergedAction = entityManager.merge(action);
|
final Action mergedAction = entityManager.merge(action);
|
||||||
@@ -615,7 +615,7 @@ public class DeploymentManagement {
|
|||||||
* the rolloutgroup for this action
|
* the rolloutgroup for this action
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_UPDATE_TARGET)
|
||||||
public void createScheduledAction(final List<Target> targets, final DistributionSet distributionSet,
|
public void createScheduledAction(final List<Target> targets, final DistributionSet distributionSet,
|
||||||
final ActionType actionType, final long forcedTime, final Rollout rollout,
|
final ActionType actionType, final long forcedTime, final Rollout rollout,
|
||||||
@@ -649,7 +649,7 @@ public class DeploymentManagement {
|
|||||||
* @return the action which has been started
|
* @return the action which has been started
|
||||||
*/
|
*/
|
||||||
@Modifying
|
@Modifying
|
||||||
@Transactional(isolation = Isolation.READ_UNCOMMITTED)
|
@Transactional(isolation = Isolation.READ_COMMITTED)
|
||||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET + SpringEvalExpressions.HAS_AUTH_OR
|
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_TARGET + SpringEvalExpressions.HAS_AUTH_OR
|
||||||
+ SpringEvalExpressions.IS_SYSTEM_CODE)
|
+ SpringEvalExpressions.IS_SYSTEM_CODE)
|
||||||
public Action startScheduledAction(@NotNull final Action action) {
|
public Action startScheduledAction(@NotNull final Action action) {
|
||||||
|
|||||||
Reference in New Issue
Block a user