Yair Zaslavsky has posted comments on this change.

Change subject: core: avoid reconstructs based on stale data
......................................................................


Patch Set 2: (4 inline comments)

....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
Line 439:                         @Override
Line 440:                         public EventResult call() {
Line 441:                             storage_pool storagePoolDb = 
DbFacade.getInstance().getStoragePoolDao()
Line 442:                                     .get(_storagePoolId);
Line 443:                             // means that no reconstruct/recovery 
operation ran before the event execution.
Move the comment to the block of the if.
IMHO, A comment outside the block of if (which is located one line above if ) 
shouild start with "checks whether " or "checks if"
Line 444:                             if (storagePoolDb != null
Line 445:                                     && 
storagePoolDb.getmaster_domain_version() == 
storagePool.getmaster_domain_version()) {
Line 446:                                 log.warnFormat(logMessage);
Line 447: 


Line 452:                                 return ResourceManager.getInstance()
Line 453:                                         .getEventListener()
Line 454:                                         
.masterDomainNotOperational(masterDomainId, storagePool.getId());
Line 455:                             } else {
Line 456:                                 return new EventResult(true, 
EventType.RECONSTRUCT);
Not sure what you achieve by this line.
Line 457:                             }
Line 458:                         }
Line 459:                     });
Line 460:             throw new IRSNoMasterDomainException(exceptionMessage);


....................................................
Commit Message
Line 9: IrsBrokerCommand._updatingTimer_Elapsed is triggered by a timer, loads
Line 10: the storage pool from the db and then perform GetStoragePoolInfo vds
Line 11: command. The master version received from vdsm and from the db are 
being
Line 12: compared - if they are different reconstruct command is being executed
Line 13: because of the version difference. There's no garuntee that recovery
typo
Line 14: didn't run after the storage pool data has been loaded from the DB but
Line 15: before we added a new reconstruct operation to the queue.
Line 16: 
Line 17: The proposed solution adds a check to verify whether to master version


Line 13: because of the version difference. There's no garuntee that recovery
Line 14: didn't run after the storage pool data has been loaded from the DB but
Line 15: before we added a new reconstruct operation to the queue.
Line 16: 
Line 17: The proposed solution adds a check to verify whether to master version
s/to/the
Line 18: has changed since we first loaded it, if it did it means that recovery
Line 19: operation ran meanwhile and that we shouldn't perform reconstruct.
Line 20: 
Line 21: Change-Id: Ib2dd69b1766ab92be7428c8973590709a52d5d48


--
To view, visit http://gerrit.ovirt.org/10764
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2dd69b1766ab92be7428c8973590709a52d5d48
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to