* Implementation of optimistic lock pattern Try to insert the remote cache key and handle integrity error * Remove transaction Integrity error inside a transaction results in deadlock * Remove check for existing remote cache key Is no longer needed since integrity constrain violations are handled * Add check for integrity constrain violation Do not update the row if the insert statement fails for other than an integrity constrain violation * Handle failing inserts because of deadlocks If the insert statement fails because of a deadlock try to update the row * Add utility function for returning SQL error code Useful for debugging * Add logging for failing expired cache key deletion Do not shallow it completely * Revert "Add utility function for returning SQL error code" This reverts commit 8e0b82c79633e7d8bc350823cbbab2ac7a58c0a5. * Better log for failing deletion of expired cache key * Add some comments * Remove check for existing cache key Attempt to insert the key without checking if it's already there and handle the error situations * Do not propagate deadlocks created during update Most probably somebody else is trying to insert/update the key at the same time so it is safe enough to ignore it
Name |
Last commit
|
Last Update |
---|---|---|
.circleci | Loading commit data... | |
.github | Loading commit data... | |
conf | Loading commit data... | |
devenv | Loading commit data... | |
docs | Loading commit data... | |
emails | Loading commit data... | |
packages | Loading commit data... | |
packaging | Loading commit data... | |
pkg | Loading commit data... | |
public | Loading commit data... | |
scripts | Loading commit data... | |
style_guides | Loading commit data... | |
tools/phantomjs | Loading commit data... | |
vendor | Loading commit data... | |
.babelrc | Loading commit data... | |
.bra.toml | Loading commit data... | |
.browserslistrc | Loading commit data... | |
.dockerignore | Loading commit data... | |
.editorconfig | Loading commit data... | |
.gitignore | Loading commit data... | |
.prettierignore | Loading commit data... | |
CHANGELOG.md | Loading commit data... | |
CODE_OF_CONDUCT.md | Loading commit data... | |
CONTRIBUTING.md | Loading commit data... | |
Dockerfile | Loading commit data... | |
Gruntfile.js | Loading commit data... | |
LICENSE | Loading commit data... | |
Makefile | Loading commit data... | |
NOTICE.md | Loading commit data... | |
PLUGIN_DEV.md | Loading commit data... | |
README.md | Loading commit data... | |
ROADMAP.md | Loading commit data... | |
UPGRADING_DEPENDENCIES.md | Loading commit data... | |
build.go | Loading commit data... | |
go.mod | Loading commit data... | |
go.sum | Loading commit data... | |
jest.config.e2e.js | Loading commit data... | |
jest.config.js | Loading commit data... | |
latest.json | Loading commit data... | |
package.json | Loading commit data... | |
tsconfig.json | Loading commit data... | |
tslint.json | Loading commit data... | |
yarn.lock | Loading commit data... |