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

MongoDB - Batch Size On Aggregate Options #11565

Closed
RronJahiri opened this issue Aug 24, 2020 · 8 comments
Closed

MongoDB - Batch Size On Aggregate Options #11565

RronJahiri opened this issue Aug 24, 2020 · 8 comments
Labels
good first issue Good for newcomers kind/enhancement New feature or request
Milestone

Comments

@RronJahiri
Copy link

Describe the extension
On AggregateOptions in io.quarkus.mongodb package add batchSize variable because we want option that can get documents with batches not all documents at once.

Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).

Configuration suggestion

 public <T> AggregatePublisher<T> apply(AggregatePublisher<T> stream) {
        AggregatePublisher<T> publisher = stream;
/*before code
        if (hint != null) {
            publisher = publisher.hint(hint);
        }
        if (comment != null) {
            publisher = publisher.comment(comment);
        }
        if (collation != null) {
            publisher = publisher.collation(collation);
        }
        publisher.bypassDocumentValidation(bypassDocumentValidation);
        publisher.allowDiskUse(allowDiskUse);
        if (maxAwaitTime > 0) {
            publisher.maxAwaitTime(maxAwaitTime, maxAwaitTimeUnit);
        }
        if (maxTime > 0) {
            publisher.maxAwaitTime(maxTime, maxTimeUnit);
        }
*/
/* added part
        if(batchSize > 0){
            publisher.batchSize(batchSize);
        }
*/
        return publisher;
    }

Additional context
(Add any other context about the proposal here.)

@RronJahiri RronJahiri added the kind/extension-proposal Discuss and Propose new extensions label Aug 24, 2020
@gsmet gsmet added kind/enhancement New feature or request and removed kind/extension-proposal Discuss and Propose new extensions labels Aug 24, 2020
@gsmet
Copy link
Member

gsmet commented Aug 24, 2020

/cc @loicmathieu

@gsmet gsmet changed the title Batch Size On Aggregate Options MongoDB - Batch Size On Aggregate Options Aug 24, 2020
@loicmathieu
Copy link
Contributor

@RronJahiri this should be easily feasible ;)

I can do it or you can provide a PR if you want to contribute ?

@RronJahiri
Copy link
Author

or you can provide a PR if you want to

Okay i will do a PR.

Thanks !

@RronJahiri
Copy link
Author

@loicmathieu sorry for this late response! I cannot do a PR because of some issues when getting Quarkus project. Could you please implement it?

The same should also be implemented in the following class - io.quarkus.mongodb.FindOptions

Thank you.

@loicmathieu loicmathieu self-assigned this Sep 15, 2020
@loicmathieu
Copy link
Contributor

OK, I add this to my TODO list.

@loicmathieu loicmathieu added the good first issue Good for newcomers label Sep 23, 2020
@loicmathieu loicmathieu removed their assignment Sep 28, 2020
@lucasscharf
Copy link

May I try handle this issue?

@loicmathieu
Copy link
Contributor

@lucasscharf someone already provides a pr for it.

loicmathieu added a commit that referenced this issue Oct 7, 2020
MongoDB - Batch Size On Aggregate Options & Find Options
@loicmathieu loicmathieu added this to the 1.9.0 - master milestone Oct 7, 2020
@loicmathieu
Copy link
Contributor

Fixed by #12489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants