Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
BZ-1192459: quick remediation for deadlock. this should be improved i…
Browse files Browse the repository at this point in the history
…n order to avoid method level sync.

(definitive solution should be careful in order to preserve clustering sync)
  • Loading branch information
porcelli committed Feb 20, 2015
1 parent 0fa1afa commit ecfd8c6
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -234,7 +234,7 @@ public boolean addConfiguration( final ConfigGroup configGroup ) {
}

@Override
public boolean updateConfiguration( ConfigGroup configGroup ) {
public synchronized boolean updateConfiguration( ConfigGroup configGroup ) {
String filename = configGroup.getName().replaceAll( INVALID_FILENAME_CHARS, "_" );

final Path filePath = ioService.get( systemRepository.getUri() ).resolve( filename + configGroup.getType().getExt() );
Expand All @@ -258,7 +258,7 @@ public boolean updateConfiguration( ConfigGroup configGroup ) {
}

@Override
public boolean removeConfiguration( final ConfigGroup configGroup ) {
public synchronized boolean removeConfiguration( final ConfigGroup configGroup ) {

//Invalidate cache if an item has been removed; otherwise cached value is stale
configuration.remove( configGroup.getType() );
Expand Down

0 comments on commit ecfd8c6

Please sign in to comment.