-
Notifications
You must be signed in to change notification settings - Fork 177
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
Conversation
for (const batch of batches) { | ||
prepInsertionObjectBatch(batch) | ||
await Objects().insert(batch).onConflict().ignore() | ||
servicesLogger.info(`Inserted ${batch.length} objects`) |
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.
servicesLogger.info({batchLength: batch.length }, 'Inserted {batchLength} objects')
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 think this should be 'Inserted {batchSize} objects'
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.
Changed, thanks both!
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 () => { |
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.
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.
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.
That's why i commented out - happy to "skip" it in a proper way later down the line
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.