Hi Jeff, Thanks a lot for your comments.
At your first question "Would this be implemented solely in the write path?”, the answer is yes. I think enforcing it at reads/compaction/repairs may pose problems for cases in which an alter table is performed adding new or more strict constraints to a table that has some already offending data. I think the cleanest way to handle these scenarios is to just prevent new data to be added if it does not comply with the current constraints. At your second comment: For the third point, I didn’t want to be prescriptive on what those validations should be, but the fact that the proposal is extensible to those potential use cases is something concrete that, in my opinion, comes as a benefit of the actual proposal. I’d be happy to develop a bit more the main example used of sizeOf if it helps alleviate your concerns on this point. I still do think that the general benefit of allowing flexibility at adding limits to what can be written to the database is something positive that help Cassandra users keep healthy clusters. > On Jun 2, 2024, at 12:04 PM, Jeff Jirsa <jji...@gmail.com> wrote: > > Separately, when we discuss benefits of a proposal in a CEP, we should talk > about what’s concrete and ignore the stuff that’s idealistic. Of these four > points: > > This brings to the table several benefits and flexibility. Some examples: > > Cassandra operators have more control to reason about your data and > appropriately tune for performance. > Potential reduction on maintenance overhead, being able to better predict > partition sizes. > Extensibility to more complex validations in the future. > Potential value in storage engine making decisions based on data size. > The second is just the first, restated, and the fourth seems incredibly > unlikely. The third seems maybe possible, but why not spec out the full range > with the CEP instead of assuming iterative implementation? > > > >> On Jun 2, 2024, at 20:59, Jeff Jirsa <jji...@gmail.com> wrote: >> >> >> Would this be implemented solely in the write path? Or would you also try to >> enforce it in the read and sstable/compaction/repair paths as well? >> >> >> >>> On May 31, 2024, at 23:24, Bernardo Botella <conta...@bernardobotella.com> >>> wrote: >>> >>> Hello everyone, >>> >>> I am proposing this CEP: >>> https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-42%3A+Constraints+Framework >>> >>> And I’m looking for feedback from the community. >>> >>> Thanks a lot! >>> Bernardo