vitess
vitess copied to clipboard
vttablet: better visibility for unmanaged tablets
Feature Description
A Vitess vttablet usually runs a managed mysql instance. However for certain use cases, say, for importing data from an external database into Vitess, we can setup an unmanaged vttablet where we specify the connection parameters for an existing MySQL-compatible database.
Currently we don't have a special flag to signal vttablet's that it is an unmanaged tablet. Instead, in the code, we infer this using DBConfigs.HasGlobalSettings() (true=>Host or Socket is not null).
For an unmanaged tablet, not all vttablet flags apply. However we don't explicitly check for these.
Ideally we should have a vttablet-level attribute so that code within a tabletserver/tabletmanager can authoritatively know that it is being run in an unmanaged mode.
For this a separate flag, say --unmanaged is probably indicated. It is likely that we didn't start with such a flag from the start in an attempt to minimize the number of vttablet flags. But that ship has sailed, and adding a flag will help add both better visibility and user experience while setting up unmanaged tablets.
To summarize:
- Add explicit flag to signal an unmanaged tablet
- Add validations that check for expected flags
- Test connectivity to external sql while starting, it not already present
- Add validations to check that incompatible flags are not defined
- Display this in relevant vttablet APIs and expose in /debug/vars
Use Case(s)
https://vitess.io/docs/15.0/reference/programs/vttablet/#external-mysql https://vitess.io/docs/15.0/user-guides/configuration-advanced/unmanaged-tablet/
Hi @rohit-nayak-ps, I am new to this codebase and I would love to contribute, may I pick this up?
Hi @rohit-nayak-ps, I am new to this codebase and I would love to contribute, may I pick this up?
Sure, we are always happy to have new contributors! I assigned this issue to you.
@vishal-chdhry Are you still working on this issue?
@rohit-nayak-ps I'd like to work on this issue. Could you please assign it to me if no one does?
@mohamedawnallah Oh! Extremely sorry, I forgot about this.
You may pick this up if you would like to work on it
@rohit-nayak-ps I'd like to work on this issue. Could you please assign it to me if no one does?
Assigned, thanks for volunteering.
@rohit-nayak-ps I would like to work on this issue if this is still persisting
You can feel free to work on it. However this requires some basic knowledge of Vitess, so only attempt it if you have got a working installation of Vitess and have played around / used it a bit.
@rohit-nayak-ps can you please assign me this issue?
@beingnoble03 Please feel free to work on it. We keep assigning things like this to people and then nothing happens, which causes additional work and problems.
@mattlord sure, thanks.