Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10226

Support multiple non-PK cols in MV clustering key when partition key is shared

    XMLWordPrintableJSON

Details

    Description

      This issue is similar to CASSANDRA-9928, but with one key limitation: the MV partition key must match the base table's partition key. This limitation results in the base replica always pairing with itself as the MV replica. Because of this pairing, if the base replica is lost, any MV rows that would otherwise be ambiguous are also lost. This allows us to avoid the problem described in 9928 of not knowing which MV row to delete.

      Although this limitation has the potential to be a bit confusing for users, I believe this improvement is still worthwhile because:

      • The base table's partition key will often be a good choice for the MV partition key as well. I expect it to be common for users to partition data the same way, but use a different clustering order to optimize for (or allow for) different queries.
      • It may take a long time to solve the problems presented in 9928 in general (if we can solve them at all). On the other hand, this is straightforward and is a significant improvement to the usability of MVs.

      I have a minimal prototype of this that works well, so I should be able to upload a patch with thorough tests within the next few days.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thobbs Tom Hobbs
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: