Skip to content
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

Add support for DLS in Dropbox #1839

Merged
merged 17 commits into from
Nov 15, 2023

Conversation

akanshi-elastic
Copy link
Contributor

Part of https://github.com/elastic/connectors/issues/1819###

Checklists

Pre-Review Checklist

  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)

@akanshi-elastic akanshi-elastic marked this pull request as ready for review October 25, 2023 09:40
@akanshi-elastic akanshi-elastic requested a review from a team October 25, 2023 09:40
@akanshi-elastic akanshi-elastic requested review from vidok and removed request for a team October 25, 2023 09:41
else:
return document, None

if filtering and filtering.has_advanced_rules():
if self._dls_enabled():
account_id, member_id = await self.get_account_details()
Copy link
Contributor

@vidok vidok Oct 30, 2023

Choose a reason for hiding this comment

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

It's better to decouple this block of code into a separate method.

@akanshi-elastic
Copy link
Contributor Author

@akanshi-elastic akanshi-elastic marked this pull request as draft November 3, 2023 12:08
@akanshi-elastic akanshi-elastic marked this pull request as ready for review November 3, 2023 12:42
@akanshi-elastic akanshi-elastic requested a review from vidok November 3, 2023 12:42
@@ -35,7 +40,10 @@
DEFAULT_RETRY_AFTER = 300 # seconds
RETRY_INTERVAL = 2
MAX_CONCURRENT_DOWNLOADS = 100
REQUEST_BATCH_SIZE = 50
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please explain how you came up with this number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

max batch size we can pass is 100 as per documentation but as we are storing the complete document with the file id in dictionary on line 1137 so it's throwing Queue Full error while running the connector. To fix this issue we tried to pass less number document in batch and it's working fine with REQUEST_BATCH_SIZE 50

@akanshi-elastic akanshi-elastic requested a review from vidok November 8, 2023 07:52
@akanshi-elastic akanshi-elastic marked this pull request as draft November 14, 2023 07:51
@akanshi-elastic akanshi-elastic marked this pull request as ready for review November 14, 2023 08:16
@akanshi-elastic akanshi-elastic merged commit 9aa814b into elastic:main Nov 15, 2023
Copy link

💔 Failed to create backport PR(s)

The backport operation could not be completed due to the following error:
There are no branches to backport to. Aborting.

The backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 1839 --autoMerge --autoMergeMethod squash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants