Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

support huge amount of datacubes - #1004

Open
bikov wants to merge 2 commits into
allegro:masterfrom
bikov:support-large-ammount-of-datasources
Open

support huge amount of datacubes#1004
bikov wants to merge 2 commits into
allegro:masterfrom
bikov:support-large-ammount-of-datasources

Conversation

@bikov

@bikov bikov commented Dec 22, 2022

Copy link
Copy Markdown

We have a large number of datasources in our use - and when trying to use Turnilo we are getting {"error": "Can't fetch settings", "message": "Invalid string length"} when querying /sources
This should help us to support our use case with a large number of datacubes by splitting datacubes API from clusters API and adding pagination to the /sources/dataCubes

@bikov
bikov requested a review from a team as a code owner December 22, 2022 16:55
@mkuthan

mkuthan commented Dec 23, 2022

Copy link
Copy Markdown
Member

Thank you for the contribution, we'll review the changes. Due to a Christmas break you could expect the review in the beginning of the new year.

Comment thread src/client/utils/ajax/ajax.ts Outdated
Comment thread src/client/utils/ajax/ajax.ts Outdated
…usters and adding pagination to the `/sources/dataCubes`
@bikov
bikov force-pushed the support-large-ammount-of-datasources branch from 13a888a to 4a0ade5 Compare December 26, 2022 14:17
Comment thread src/client/utils/ajax/ajax.ts Outdated
Comment thread src/client/utils/ajax/ajax.ts Outdated
Comment thread src/server/routes/sources/sources.ts Outdated
Comment thread src/server/routes/sources/sources.ts Outdated
Comment thread src/client/utils/ajax/ajax.ts Outdated
let dataCubesResult: SerializedDataCube[] = [];
let isDone = false;
let batch = 0;
while (!isDone) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we could extract this to async iterator and with for await ... of. That's very loose idea though!

…usters and adding pagination to the `/sources/dataCubes` - CR fixes
@bikov

bikov commented Jan 4, 2023

Copy link
Copy Markdown
Author

@adrianmroz-allegro Thank you for the review - I've fixed the comments

@adrianmroz-allegro

Copy link
Copy Markdown
Contributor

@bikov oh, that's unfortunate :) We were discussing your PR on one of our meetings and I'm finishing my implementation of this feature. If that's ok with you I'd like to push my solution and get review from you.

@adrianmroz-allegro

Copy link
Copy Markdown
Contributor

@bikov We had long weekend there - sorry for delay. PR is here: #1012 I'm still working on good tests for this, because we won't be using this feature so we'd like to have some confidence there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants