-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add API support for transaction metadata on WriteRels and DeleteRels #2084
Conversation
5b93474
to
1f6dffb
Compare
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.
See comments, otherwise LGTM
@@ -42,6 +43,8 @@ var writeUpdateCounter = promauto.NewHistogramVec(prometheus.HistogramOpts{ | |||
Buckets: []float64{0, 1, 2, 5, 10, 15, 25, 50, 100, 250, 500, 1000}, | |||
}, []string{"kind"}) | |||
|
|||
const MaximumTransactionMetadataSize = 65000 // bytes. Limited by the BLOB size used in MySQL driver |
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.
Is it worth making this datastore-specific? Or will we burn that bridge when we get to 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.
I'd rather set it to the low amount and reevaluate in the future if need be. "65K should be enough for anyone!"
} | ||
|
||
if len(b) > MaximumTransactionMetadataSize { | ||
return NewTransactionMetadataTooLargeErr(len(b), MaximumTransactionMetadataSize) |
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.
Are we guaranteed that the client encoding will match the JSON encoding? i.e. will the size that that the client sees on their machine match what we're validating against here?
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.
No; this is a rough estimate but since the drivers store JSON too, it should be sufficient
1f6dffb
to
83f4bf2
Compare
83f4bf2
to
d281ced
Compare
d281ced
to
bb6362c
Compare
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.
Reapproving after rebase
No description provided.