-
Notifications
You must be signed in to change notification settings - Fork 367
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
Lakefs was crashing when using database.type=”dynamodb” and using #6924
Conversation
scylladb as a database (scylladb provides dynamodb API which can be enabled via alternator feature - https://opensource.docs.scylladb.com/stable/alternator/alternator.html) Apparently scylladb does not fully follow spec and does not return ConsumedCapacity. Adding check for nil pointer to avoid crashes in lakefs.
|
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.
Thanks for your contribution! This looks like a very useful fix and it is obviously useful.
I would prefer never to publish any values to the metric on ScyllaDB, rather than publish zeros, and made a suggestion,
I know of ScyllaDB but have never operated one in production. Can you expand on your use-case? If there are other issues operating with it, it might be better to write a full KV implementation using a more native ScyllaDB API than to use their DynamoDB translator.
yup, agree with all suggestions. Tested suggested change on my env locally (no issues found ) . Committing Co-authored-by: Ariel Shaqed (Scolnicov) <[email protected]>
@arielshaqed @nopcoder |
lakeFS makes some consistency demands of its object and kv stores.
|
(To be clear: if everything is compatible enough, it will with and we won't break it.) |
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.
Thanks!
Pulling... Esti can't run from a fork IIRC. |
using scylladb as a database (scylladb provides dynamodb API which can be enabled via alternator feature -
https://opensource.docs.scylladb.com/stable/alternator/alternator.html)
Apparently scylladb does not fully follow the spec and does not return ConsumedCapacity. Adding check for nil pointer to avoid crashes in lakefs.
Closes #(6923)
#6923
Change Description
simply checking for nil pointer to avoid crash
Background
Running scylladb locally with dynamodb api enabled via alternator feature (https://www.scylladb.com/alternator/)
Lakefs crashes in pkg/kv/dynamodb/store.go: 477 since it is getting nil pointer in queryResult.ConsumedCapacity
// dynamoConsumedCapacity.WithLabelValues(operation).Add(*queryResult.ConsumedCapacity.CapacityUnits)
database:
type: "dynamodb"
dynamodb:
table_name: "kvstore"
endpoint: "http://127.0.0.1:8777/"
Apparently scylladb did not fully follow the spec and returns nil in ConsumedCapacity but crashing is not a good option
Share context and relevant information for the PR: offline discussions, considerations, design decisions etc.
Bug Fix
If this PR is a bug fix, please let us know about:
New Feature
If this PR introduces a new feature, describe it here.
Testing Details
How were the changes tested?
compiled lakefs from changed srcs and tested against scylldb with dynamodb API enabled (local scylladb cluster).
Did sanity test - all works as expected
Breaking Change?
Nope
Does this change break any existing functionality? (API, CLI, Clients)
Additional info
Logs, outputs, screenshots of changes if applicable (CLI / GUI changes)
Contact Details
[email protected]
How can we get in touch with you if we need more info? (ex. [email protected])