Repository navigation
Do not delete data on a CRR location when backbeat updates metadata #6328
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1007,7 +1007,9 @@ function putMetadata(request, response, bucketInfo, objMd, log, callback) { | |
| // transition processor. Check the content-length as a null location can | ||
| // also be from an empty object. | ||
| (omVal['content-length'] === 0 || (omVal.location && Array.isArray(omVal.location))) && | ||
| locationKeysHaveChanged(objMd.location, omVal.location) | ||
| locationKeysHaveChanged(objMd.location, omVal.location) && | ||
| // Do not delete data on remote location (example : pull replication) | ||
| !locationConstraints[objMd.dataStoreName]?.isCRR | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: this if condition is hard to read. Can it be simplified ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm leaving now but its more the whole function should be cleaned up its FIVE HUNDRED lines + callbacks but later later |
||
| ) { | ||
| log.info('removing old data locations', { | ||
| method: 'putMetadata', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty much https://github.com/scality/backbeat/blob/85aaab3c7ecfbbb8dcdebca21e8895f16634c9f6/extensions/lifecycle/tasks/LifecycleUpdateTransitionTask.js#L121