Comments (4)
From https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html:
A large batch size can improve efficiency for workloads that are very fast or have a lot of overhead. However, if your function returns an error, all items in the batch return to the queue.
This suggests the lambda:
- must be able to 'unwind' any successful registrations in the face of an error within the batch
OR - not 'unwind', return the real error and return the items to the queue, and then not return an error the next time if earlier registrations have already made it into the catalog (aka 'CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME')
If option 2, what prevents whatever issue that caused the failure the first time from also failing in the next batch? Or maybe that's fine... all the well-behaved items will have already been registered?
from irods_client_aws_lambda_s3.
Alternatively, we embrace the lack of support for batch sizes greater than 1...
If the length of 'Records' is greater than 1:
- log a clear message for the administrator about batch size
- return an error (which will return all events to the queue for later)
This will prevent the current state of:
- partial success (with the rest of the records being ignored)
- confusion for the administrator
from irods_client_aws_lambda_s3.
Being able to support arbitrary batch sizes will require the iRODS server to handle multiple data object operations of 'register' and 'unregister', atomically (new API endpoint). And the python-irodsclient will need to learn the new server API call...
from irods_client_aws_lambda_s3.
Since 4.3.0 - the iRODS server now accepts atomic_apply_database_operations
...
but we haven't tried/tested it with the lambda yet.
However...
A new wrinkle... AWS now supports batchItemFailures
...
Since Nov 2021...
https://aws.amazon.com/about-aws/whats-new/2021/11/aws-lambda-partial-batch-response-sqs-event-source/
The official docs...
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
And a writeup from the community...
https://betterprogramming.pub/sqs-batch-processing-with-reporting-batch-item-failures-6c405c852401
from irods_client_aws_lambda_s3.
Related Issues (7)
- syntax error around ssl detection, when no ssl parameters configured
- investigate intermittent failure of session.collections.create() HOT 4
- ssl cert string fails when >4k in length
- add support for S3->SNS->SQS->Lambda->iRODS
- delete events sometimes labeled ObjectRemoved:DeleteMarkerCreated
- large create events labeled ObjectCreated:CompleteMultipartUpload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irods_client_aws_lambda_s3.