Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

feat: enable hard delete in Elasticsearch #100

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

Bingjiling
Copy link
Contributor

@Bingjiling Bingjiling commented Aug 6, 2021

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines 112 to 117
const modifyRecord: any = cloneDeep(record);
modifyRecord.eventName = 'MODIFY';
modifyRecord.dynamodb = {
OldImage: { documentStatus: { S: 'AVAILABLE' } },
NewImage: { documentStatus: { S: 'DELETED' } },
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's simpler to just declare the entire modifyRecord. Cloning and then updating gives little benefit since you need to update almost the entire record anyways.

Suggested change
const modifyRecord: any = cloneDeep(record);
modifyRecord.eventName = 'MODIFY';
modifyRecord.dynamodb = {
OldImage: { documentStatus: { S: 'AVAILABLE' } },
NewImage: { documentStatus: { S: 'DELETED' } },
};
const modifyRecord: any = {
eventID: 'some-event-id',
eventName: 'MODIFY',
dynamodb: {
OldImage: { documentStatus: { S: 'AVAILABLE' } },
NewImage: { documentStatus: { S: 'DELETED' } },
},
}

@Bingjiling Bingjiling merged commit 8cd7b62 into feat-multitenancy Aug 9, 2021
@Bingjiling Bingjiling deleted the enable-es-hard-delete branch August 9, 2021 14:29
carvantes added a commit that referenced this pull request Aug 17, 2021
* feat: Add multi tenancy to S3 binary resource(#87)

* feat: tenant isolation for DDB CRUD operations (#86)

* feat: update ddbToEs to handle multi-tenant records (#91)

* feat: Multi tenancy bulk export (#90)

* fix: list bulk export files with tenant prefix (#94)

* feat: persistence change for group export (#98)

* feat: enable hard delete in Elasticsearch (#100)


Co-authored-by: zheyanyu <zheyanyu@amazon.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants