-
Notifications
You must be signed in to change notification settings - Fork 63
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
[Core] Port 11686 Reduce cases of mass deletion #1363
base: main
Are you sure you want to change the base?
[Core] Port 11686 Reduce cases of mass deletion #1363
Conversation
…es-of-mass-deletion-from-integration-transfer-go
@@ -78,6 +78,7 @@ async def delete_diff( | |||
self, | |||
entities: EntityDiff, | |||
user_agent_type: UserAgentType, | |||
entity_deletion_threshold: float = 0.9, |
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.
I think default here should be Null
and the value will be passed
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.
I think it will be clearer to communicate it through precentage e.g. 90 rather than 0.9, wdyt?
keeping_entities=len(kept_entities), | ||
) |
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.
keeping_entities=len(kept_entities), | |
) | |
keeping_entities=len(kept_entities), | |
entity_deletion_threshold=entity_deletion_threshold | |
) |
) | ||
|
||
await self._safe_delete(diff.deleted, kept_entities, user_agent_type) | ||
delete_rate = len(diff.deleted) / len(entities["before"]) |
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.
lets use another parameter name
Description
What - Reduce cases of mass deletion from integrations (could be because of bad api's we use or just getting {} from port on the mapping)
Why - we dont want to loose data in port
How - intreduce flag
entityDeletionThreshold
Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist