You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As this project matures, we will likely want to offer features on top of what the gh-ost CLI offers. To do this, we need to enable configuration options that are not CLI arguments. An example would be to generate a dynamic postpone cutover flag file path based on the table (/tmp/gh-ost/postpone-cut-over<table>.flag)
Describe the solution you'd like
There are two solutions I'm currently split on:
namespace some sort of "enhanced" features, so the config would be like config.ghost_adapter.enhanced.feature = 100 (of course the naming needs some work). This means that any config options with under enhanced would be automatically skipped when converting to CLI args (avoiding potential bugs and future work)
add a sort of string interpolation option where a user could do something like: config.ghost_adapter.panic_flag_file = "/tmp/gh-ost/panic-%table%.flag" (and we replace %table% with the table name). of course, the actual syntax here is very much TBD (maybe just use ERB?)
Describe alternatives you've considered
A naïve solution would be to just add accepted options to the config class and then ignore specific keys when converting the config to CLI args.
We could offer separate setup methods for setting up the CLI args and setting up ghost_adapter specific features
Additional context
It would be nice to offer users the ability to say that they want a flag like --postpone-cut-over-flag-file to have a value based on the table that is being migrated. This is safer than using a static value and nicer than requiring users to implement some sort of custom logic to generate unique values. We could easily offer a config option like config.ghost_adapter.enhanced.table_specific_postpone_cut_over_flag_file = true where we would generate a path (or maybe something where they pass a directory and we would just generate the filename)
The text was updated successfully, but these errors were encountered:
As this project matures, we will likely want to offer features on top of what the
gh-ost
CLI offers. To do this, we need to enable configuration options that are not CLI arguments. An example would be to generate a dynamic postpone cutover flag file path based on the table (/tmp/gh-ost/postpone-cut-over<table>.flag
)Describe the solution you'd like
There are two solutions I'm currently split on:
config.ghost_adapter.enhanced.feature = 100
(of course the naming needs some work). This means that any config options with underenhanced
would be automatically skipped when converting to CLI args (avoiding potential bugs and future work)config.ghost_adapter.panic_flag_file = "/tmp/gh-ost/panic-%table%.flag"
(and we replace%table%
with the table name). of course, the actual syntax here is very much TBD (maybe just use ERB?)Describe alternatives you've considered
ghost_adapter
specific featuresAdditional context
It would be nice to offer users the ability to say that they want a flag like
--postpone-cut-over-flag-file
to have a value based on the table that is being migrated. This is safer than using a static value and nicer than requiring users to implement some sort of custom logic to generate unique values. We could easily offer a config option likeconfig.ghost_adapter.enhanced.table_specific_postpone_cut_over_flag_file = true
where we would generate a path (or maybe something where they pass a directory and we would just generate the filename)The text was updated successfully, but these errors were encountered: