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

CONJUBILEE-2783: SaaS Connectors: Support for Partitioning Aggregation #60

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

abhishek-hedaoo-sp
Copy link
Collaborator

Description

What is the intent of this change and why is it being made?

How Has This Been Tested?

What testing have you done to verify this change?

@abhishek-hedaoo-sp abhishek-hedaoo-sp requested a review from a team as a code owner October 3, 2024 07:03
await Promise.all(promises);
} else {
return await this.partitionAdapter.list(context, input, res, undefined);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add logging here to allow troubleshooters to determine if:

  1. We used partition aggregation or not.
  2. How long retrieving the partitions took.
  3. The number of partitions returned.
  4. Might also be useful to log when we finishing aggregating a specific partition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Point 1-3 addressed.
Point 4 - Shouldn't this get logged at the connector level? I think we do not have control to check when a particular partition is finishing.

Copy link
Contributor

Choose a reason for hiding this comment

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

For 4 I was thinking we could do something like:

let partitionsDone = 0
for (const partition of partitionList!) {
  promises.push(async () => {
    let startTime = new Date().getTime();
    await this.partitionAdapter.list(context, input, res, partition);
    partitionsDone += 1
    this.childLogger.info(`Partition ${} of ${} done after ${}`)
  })
}
await Promise.all()

The reason I think this is valuable at the library level is because it gives us a good idea of how good of a job the connector is doing at creating equally sized partitions. I remember seeing a case of partitioning on java connectors where one of the partitions ended up being much larger than the others so we weren't taking advantage of as much parallelism as we could have.

Copy link
Collaborator Author

@abhishek-hedaoo-sp abhishek-hedaoo-sp Oct 4, 2024

Choose a reason for hiding this comment

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

Makes sense. Updated the code.

@abhishek-hedaoo-sp abhishek-hedaoo-sp merged commit 09633dd into main Oct 7, 2024
4 checks passed
@abhishek-hedaoo-sp abhishek-hedaoo-sp deleted the ahedaoo/CONJUBILEE-2783 branch October 7, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants