* _bucketRequiresOplogUpdate - DELETE an object from a bucket * @param {ObjectMD} objMD - object metadata * @param {BucketInfo} bucket - bucket info * @return {boolean} whether objects require oplog updates on deletion, or not
(objMD, bucket)
| 5 | * @return {boolean} whether objects require oplog updates on deletion, or not |
| 6 | */ |
| 7 | function _deleteRequiresOplogUpdate(objMD, bucket) { |
| 8 | // If the object is archived, an oplog update is required |
| 9 | if (objMD.archive) { |
| 10 | return true; |
| 11 | } |
| 12 | // Default behavior is to require an oplog update |
| 13 | if (!bucket || !bucket.getNotificationConfiguration) { |
| 14 | return true; |
| 15 | } |
| 16 | // If the bucket has notification configuration set, we also require an oplog update |
| 17 | return Boolean(bucket.getNotificationConfiguration()); |
| 18 | } |
| 19 | |
| 20 | module.exports = { |
| 21 | _deleteRequiresOplogUpdate, |
no outgoing calls
no test coverage detected