-
Notifications
You must be signed in to change notification settings - Fork 106
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
[CON-517] Add a route to translate trackBlockchainId to copy320 CID #4377
Conversation
} | ||
|
||
// make query | ||
const queryResults = await models.File.findAll({ |
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.
have you benchmarked this query on prod DB? should make sure it uses an index / is performant
(can confirm this with explain analyze <query>
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.
I haven't yet. I'll check
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.
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.
It seems it does use an index
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.
sweet - i wanna see what this looks like against prod DB with ~50k trackIDs
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.
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.
perf
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.
query looks good - lets make sure it is sufficiently performant and that the batch size is reasonable
Description
This PR adds a new route
/batch_id_to_cid
that translates a batch of trackBlockchainIds to copy320 CIDs.The return schema looks like
Tests
Tested locally by creating a user, uploading a track, and running curl to fetch the copy320.
And he's a test on the node cli to remove any suspicion that the functional code used to create the actually does work.
Monitoring - How will this change be monitored? Are there sufficient logs / alerts?