Comments (5)
Hi! We investigated the issue. Steps to reproduce:
- Run ImmuDB on AWS Fargate, connected to S3 as storage
- Reach memory limit due back-up restore or/and a lot of simultaneous queries to DB
- Fargate task will be moved to the DRAINED status and then restarted.
- New Fargate task will be running with error described in this issue and then "Started with an empty default database"
The rootcause that from the one side ImmuDB anyway host some recent data files (like tx or ay else) on the Docker conatiner (in our case - Fargate site) File system and from another side - instead docker or docker-compose - AWS Fargate create completly new instance of the tasks . Old data (volume) is just vanished without any way to restore them.
So, looks like it impossible to use ImmuDB running it on AWS Fargate and to be sure that data will not be lost after Fargate task crushes.
Currently, immudb asynchronously upload data to S3, so as you describe data may be lost in such cases. Replication could be used to mitigate this scenarios but master election is not implemented so it may require manual intervention or an external tooling to determine the best instance. @SimoneLazzaris you may be able to extend in this aspect.
Another possibility is to implement a synchronous operation mode when using S3 but a noticeable performance degradation would be expected. Nevertheless it seems a nice capability for use cases were degraded performance is still acceptable.
from immudb.
Update: according to the logs we found next:
immudb 2023/11/03 12:15:47 INFO: Index '/var/lib/immudb/defaultdb/index' {ts=0, discarded_snapshots=1} successfully loaded
immudb 2023/11/03 12:15:47 INFO: Discarding snapshots due to invalid checksum at '/var/lib/immudb/defaultdb/index'
...
immudb 2023/11/03 12:15:48 INFO: tx data is corrupted: ALH mismatch at tx 14356323323871488: discarding pre-committed transaction: 1
And a lot of other mentions about "discarded" data
Then after some time immudb starts empty db:
immudb 2023/11/03 12:15:47 INFO: Started with an empty default database
So why it may happen and how to fix this?
from immudb.
Update: according to the logs we found next:
immudb 2023/11/03 12:15:47 INFO: Index '/var/lib/immudb/defaultdb/index' {ts=0, discarded_snapshots=1} successfully loaded immudb 2023/11/03 12:15:47 INFO: Discarding snapshots due to invalid checksum at '/var/lib/immudb/defaultdb/index' ... immudb 2023/11/03 12:15:48 INFO: tx data is corrupted: ALH mismatch at tx 14356323323871488: discarding pre-committed transaction: 1
And a lot of other mentions about "discarded" data Then after some time immudb starts empty db:
immudb 2023/11/03 12:15:47 INFO: Started with an empty default database
So why it may happen and how to fix this?
We'll review it asap.
Some data seems to be loaded and thus the mismatch described in the logs. Non-fully committed transactions may be discarded as the client shouldn't have received any confirmation.
from immudb.
Hi! Thanks a lot!
It happens when the immudb container crushed/reload by some reason (like automatically by AWS Fargate). Just my assumption that files on S3 updates not all-in-once but one-by-one or even batches. And in this case immudb can't process it completely before reload, therefore signature become invalid... it's just my assumption =)
But, anyway reload of service it's quite common process.
from immudb.
Hi! We investigated the issue. Steps to reproduce:
- Run ImmuDB on AWS Fargate, connected to S3 as storage
- Reach memory limit due back-up restore or/and a lot of simultaneous queries to DB
- Fargate task will be moved to the DRAINED status and then restarted.
- New Fargate task will be running with error described in this issue and then "Started with an empty default database"
The rootcause that from the one side ImmuDB anyway host some recent data files (like tx or ay else) on the Docker conatiner (in our case - Fargate site) File system and from another side - instead docker or docker-compose - AWS Fargate create completly new instance of the tasks . Old data (volume) is just vanished without any way to restore them.
So, looks like it impossible to use ImmuDB running it on AWS Fargate and to be sure that data will not be lost after Fargate task crushes.
from immudb.
Related Issues (20)
- Dockerfile IMMUDB_ADMIN_PASSWORD not support HOT 1
- ImmuDB 1.5.0 Chart missing from Helm index HOT 4
- ARM64 Support for ImmuDB HOT 5
- Question: History with SQL HOT 1
- service install the config option not work HOT 1
- Wrong error message when (mis)using aggregate functions
- Incorrect result: `UNION` does not deduplicate rows HOT 2
- SELECT after INSERT in transaction (regression)
- Setting ImmuDB embedded Store MaxKeyValue is not working HOT 1
- Instead of checking subfolders of the remote storage immudb checks it from the root.
- Set admin password on AWS EC2 image using user data
- New immudb instance with S3 options turned on cause a startup error HOT 1
- The immudb logs are not availabe HOT 6
- immudb replica uses too much RAM
- Deleted data is still accessible using history
- Key commited in a transaction is not visible in the next transaction HOT 3
- tx read conflict error on a concurrent read HOT 1
- Error deploying immudb on EKS cluster with EBS added HOT 1
- Getting Error: indexed key of unsupported type or exceeded length: can not create index HOT 3
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 immudb.