-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
RFC: access data via an interface in vtorc
#17190
Comments
A bit unrelated, but maybe time to fix this too:
and
..should just use a Related to this, it seems we have no indices on cc @GuptaManan100 for 💡s |
I like the idea of the RFC, just one thing I'd like to correct.
This is not true. We have all the information that we store in a tablet record in |
A refactor that makes things more testable is always welcome! I have always thought that the way VTOrc DB code is written was a little bit hard to test. I had introduced an interface for testing before as well. It is present in
but your proposal is way better. |
@GuptaManan100 great, good to know! Another refactor I'd like to do is stop using the unindexed If we |
To be clear, I mean storing the alias of each tablet's current primary. I'll review where it's available |
@GuptaManan100 I've moved the discussion re: the primary alias in For the backend interface this issue describes, I'll get started on it 👍 |
Renamed LegacyReadInstanceClusterAttributes(ctx context.Context, primaryHost string, primaryPort int) (*inst.Instance, error) And added future-replacement that uses ReadInstanceClusterAttributes(ctx context.Context, primaryAlias *topodatapb.TabletAlias) (*inst.Instance, error) |
Feature Description
This RFC proposes a new golang interface is added to
go/vt/vtorc/db
to allow:go/vt/vtorc/logic
has some database logic in itThe move to this would involve:
type DB interface
I've done a quick scan over the code, and I probably missed something, but here is a rough draft interface that should support the existing code. There are some small tweaks such as:
struct
s*topodatapb.TabletAlias
vs the opinionatedtabletAlias string
ctx context.Context
to everythingcc @GuptaManan100 for thoughts 🙇
Rough draft:
Use Case(s)
Developers and indirectly users of vtorc
The text was updated successfully, but these errors were encountered: