> On May 12, 2023, at 11:36 AM, Caleb Rackliffe <calebrackli...@gmail.com> > wrote: > > [POLL] Centralize existing syntax or create new syntax? > > 1.) CREATE INDEX ... USING .... WITH OPTIONS... > 2.) CREATE LOCAL INDEX ... USING ... WITH OPTIONS... (same as 1, but adds > LOCAL keyword for clarity and separation from future GLOBAL indexes) > > (In both cases, we deprecate w/ client warnings CREATE CUSTOM INDEX)
2. > > > [POLL] Should there be a default? (YES/NO) Yes. > [POLL] What do do with the default? > > 1.) Allow a default, and switch it to SAI (no configurables) > 2.) Allow a default, and stay w/ the legacy 2i (no configurables) > 3.) YAML config to override default index (legacy 2i remains the default) > 4.) YAML config/guardrail to require index type selection (not required by > default) 1 or 2. 3 and 4 are bad options IMHO. As a user I expect defaults to remain consistent across installations with the same major version. Allowing configurable defaults will change CQL behavior based on Cassandra's configuration. This makes things very unpredictable and at that point it is better to force the user to explicitly select their index implementation. Imagine a user's surprise where they run the same DDL script to setup a schema on two clusters and they end up with a _different_ index because the clusters had different defaults. This is not the user experience we should be aiming for. > > On Fri, May 12, 2023 at 12:39 PM Mick Semb Wever <m...@apache.org > <mailto:m...@apache.org>> wrote: >>> >>> Given it seems most DBs have a default index (see Postgres, etc.), I tend >>> to lean toward having one, but that's me... >> >> >> I'm for it too. Would be nice to enforce the setting is globally uniform to >> avoid the per-node problem. Or add a keyspace option. >> >> For users replaying <5 DDLs this would just require they set the default >> index to 2i. >> This is not a headache, it's a one-off action that can be clearly expressed >> in NEWS. >> It acts as a deprecation warning too. >> This prevents new uneducated users from creating the unintended index, it >> supports existing users, and it does not present SAI as the battle-tested >> default. >> >> Agree with the poll, there's a number of different PoVs here already. I'm >> not fond of the LOCAL addition, I appreciate what it informs, but it's just >> not important enough IMHO (folk should be reading up on the index type).