bug 9503: race condition in taking ownership of a Host when a Management server is restarted

status 9503: resolved fixed
This commit is contained in:
Abhinandan Prateek 2011-04-20 16:37:12 +05:30
parent a99f925de1
commit 48eebe8e7a
5 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
}
private void runDirectAgentScanTimerTask() {
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
GlobalLock scanLock = GlobalLock.getInternLock("clustermgr.scan");
try {
if(scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
try {

View File

@ -1804,7 +1804,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
@Override
public void cleanupStorage(boolean recurring) {
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
GlobalLock scanLock = GlobalLock.getInternLock("storagemgr.cleanup");
try {
if (scanLock.lock(3)) {

View File

@ -108,7 +108,7 @@ public class SnapshotSchedulerImpl implements SnapshotScheduler {
// We don't maintain the time. The timer task does.
_currentTimestamp = currentTimestamp;
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
GlobalLock scanLock = GlobalLock.getInternLock("snapshot.poll");
try {
if(scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
try {

View File

@ -405,7 +405,7 @@ public class UploadMonitorImpl implements UploadMonitor {
try {
s_logger.info("Extract Monitor Garbage Collection Thread is running.");
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
GlobalLock scanLock = GlobalLock.getInternLock("uploadmonitor.storageGC");
try {
if (scanLock.lock(3)) {
try {

View File

@ -1124,7 +1124,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
protected void cancelWorkItems(long nodeId) {
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
GlobalLock scanLock = GlobalLock.getInternLock("vmmgr.cancel.workitem");
try {
if (scanLock.lock(3)) {