-
Notifications
You must be signed in to change notification settings - Fork 6
GPII-3250: Pre-warm the data loaded by dataloader #7
Conversation
|
This approach seems fine. Couple questions:
|
loadData.sh
Outdated
| warm(){ | ||
| VIEW=$1 | ||
|
|
||
| curl -fsS $COUCHDB_URL/_design/views/_view/$VIEW >/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very expensive query, since it executes view function against ALL data in DB. I think this works now only because we have small number of records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option to reduce the cost of this query might be to run it immediately after the creation of the view when. This would require a higher degree of coupling with the test data however and I'm not sure I like the tradeoff considering that load data on a new DB should be pretty infrequent.
|
Apart from Sergey's comments, it looks good. Did you have a chance to test this all together and that it solves the GPII-3250 when a new cluster is deployed? |
This should reduce the amount of additional maintenance in the future
|
@mrtyler - thanks for your comments. Responses to your question below:
The changes on this PR are small in comparison to the structural changes @klown is making in his PR. Do we have any idea on the time frames for his merge? If it's too far off, I'd rather that we go ahead and merge this one and work on rebasing his branch after before his gets merged.
The latest commits should address this as we're now dynamically querying the views that are available. |
|
@stepanstipl - As far as testing goes:
My manual testing strategy has been to:
In repeated tests, if the old Note that in my experimentation, step (2) is necessary for couchdb to clear the index. For some reason, couchdb seems to keep the index in some form even if the db is deleted in (1). |
|
@seg10, I don't know if you heard during today's architecture meeting, but I replied about coordinating just as the meeting was ended. I'm "clown" on IRC in #fluid-work or #fluid-tech. |
|
@seg10, You wrote:
My changes to gpii-dataloader depend on changes in universal and changes in gpii-infra, and they all have to go in together. I estimate about two weeks before that happens. If your changes are ready, then I agree that it makes sense to merge this PR and then rebase my branch. |
|
LGTM Sounds like you and Joseph have a plan for merging things. I like querying the available views and warming them all -- no coupling at all! |
|
I tested this with my dev cluster and seems like this approach is working. |
|
Cool, LGTM |
|
Thanks for all the reviews! Will merge and close this out then. |
Previously, the first query to couchdb would take a hit on total time. This in turn will skew the various load/performance tests that we're running at the infrastructure level.