Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbCurrentSystem access not synchronized properly #299

Closed
ypujante opened this issue May 29, 2015 · 2 comments
Closed

DbCurrentSystem access not synchronized properly #299

ypujante opened this issue May 29, 2015 · 2 comments
Labels

Comments

@ypujante
Copy link
Member

From forum thread: http://glu.977617.n3.nabble.com/Potential-synchronization-issue-td4026912.html

@ypujante ypujante added the bug label May 29, 2015
@ypujante
Copy link
Member Author

2015/05/20 16:32:17.897 ERROR [PatchedDefaultFlushEventListener] Could not synchronize database state with session 
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.linkedin.glu.console.domain.DbCurrentSystem#1] 
        at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:687) 
        at org.linkedin.glu.console.provisioner.services.storage.SystemStorageImpl.saveCurrentSystem(SystemStorageImpl.groovy:68) 
        at org.linkedin.glu.orchestration.engine.system.SystemServiceImpl.saveCurrentSystem(SystemServiceImpl.groovy:163) 
        at org.linkedin.glu.orchestration.engine.system.AuditedSystemService.saveCurrentSystem(AuditedSystemService.groovy:37) 
        at org.linkedin.glu.console.controllers.ModelController$_saveCurrentSystem_closure14.doCall(ModelController.groovy:191) 
        at org.linkedin.glu.console.controllers.ControllerBase.withLock(ControllerBase.groovy:119) 
        at org.linkedin.glu.console.controllers.ModelController.saveCurrentSystem(ModelController.groovy:184) 
        at org.linkedin.glu.console.controllers.ModelController$_closure9.doCall(ModelController.groovy:271) 

ypujante added a commit that referenced this issue Jun 2, 2015
although the lock prevent the 2 actions to happen at the same time,
the issue is that the grails/hibernate session is flushed on request completion
hence will be flushed outside the lock

=> fix was to create new session
@ypujante
Copy link
Member Author

ypujante commented Jun 2, 2015

Fixed in 5.6.1

@ypujante ypujante closed this as completed Jun 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant