Skip to content

Conversation

@TheovanKraay
Copy link
Contributor

No description provided.

Copy link
Contributor

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

LGTM


package com.azure.cosmos.examples.bulk.sync;

import com.azure.cosmos.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we avoid star imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

private final int cpuCount = Runtime.getRuntime().availableProcessors();

//Max items to be buffered to avoid out of memory error
private final Semaphore semaphore = new Semaphore(1024 * 167 / cpuCount);
Copy link
Contributor

Choose a reason for hiding this comment

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

why the 167?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copied from async sample, I don't know the rationale behind it?

@TheovanKraay TheovanKraay merged commit 3a7314e into Azure-Samples:main Mar 6, 2024
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.

2 participants