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

feat(objs): adds feature flag for no closure writing - patch for large object sending #2379

Merged
merged 6 commits into from
Jun 17, 2024

Conversation

didimitrie
Copy link
Member

@didimitrie didimitrie commented Jun 17, 2024

TL;DR after this investigation is that simply not writing to closures might be a very good simple patch.

Note this PR also defaults the max object size to 100 (a 10x increase) in case it's not specified otherwise from the env.

@didimitrie didimitrie changed the title feat(objs): adds feature flag for no closure writing feat(objs): adds feature flag for no closure writing - patch for large object sending Jun 17, 2024
for (const batch of batches) {
prepInsertionObjectBatch(batch)
await Objects().insert(batch).onConflict().ignore()
servicesLogger.info(`Inserted ${batch.length} objects`)
Copy link
Contributor

@gjedlicska gjedlicska Jun 17, 2024

Choose a reason for hiding this comment

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

    servicesLogger.info({batchLength: batch.length }, 'Inserted {batchLength} objects')

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be 'Inserted {batchSize} objects'

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed, thanks both!

@didimitrie didimitrie marked this pull request as ready for review June 17, 2024 14:40
@didimitrie didimitrie merged commit 8b1556b into main Jun 17, 2024
19 of 23 checks passed
@didimitrie didimitrie deleted the dim/objs-fixes branch June 17, 2024 15:16
expect(res).to.have.status(400)
expect(res.text).contains('Object too large')
})
// it('Should not allow upload with invalid body (object too large)', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have preferred an it.skip or equivalent, so we're aware we're skipping a test.
Would have been better to make this test continue to work, perhaps by deploying a server with an artificially reduced threshold.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's why i commented out - happy to "skip" it in a proper way later down the line

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.

3 participants