Cassandra
  1. Cassandra
  2. CASSANDRA-3667

We need a way to deactivate row/key caching on a per-cf basis.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Initial idea would be to either have a boolean flag if we only want to allow disabling row cache, or some multi-value caches option that could be "none", "key_only", "row_only" or "all".

      1. CASSANDRA-3667-v2-with-nits-fixed.patch
        24 kB
        Pavel Yaskevich
      2. CASSANDRA-3667.patch
        68 kB
        Pavel Yaskevich

        Activity

        Hide
        Sylvain Lebresne added a comment -

        I don't care a lot but I would personally slightly prefer the multi-values setting as it's probably not very much harder to implement.

        Show
        Sylvain Lebresne added a comment - I don't care a lot but I would personally slightly prefer the multi-values setting as it's probably not very much harder to implement.
        Hide
        Pavel Yaskevich added a comment -

        I agree.

        Show
        Pavel Yaskevich added a comment - I agree.
        Hide
        Radim Kolar added a comment -

        you can reuse old cache settings for that purpose. if number of cached rows/keys is nonzero then use new global cache

        Show
        Radim Kolar added a comment - you can reuse old cache settings for that purpose. if number of cached rows/keys is nonzero then use new global cache
        Hide
        Sylvain Lebresne added a comment -

        Looks good. Two nits:

        • We probably should default to KEYS_ONLY rather than ALL to mimic our current default (and besides, having row cache opt-in seems like a saner default since for some CF it can do more harm than good).
        • CliClient.showKeyspace() uses "cache:". Let's use "caching:" for consistency sake.

        you can reuse old cache settings for that purpose

        Using the old settings on the long run would be weird and confusing, but I do am slightly worried about the pain on upgrade that the new global caches will incur to users, and it could be nice on upgrade to automatically set the value of this option for existing column families based on the preceding setting (basically use the information of whether this CF used to be cached or not). This may not be completely trivial though.

        Show
        Sylvain Lebresne added a comment - Looks good. Two nits: We probably should default to KEYS_ONLY rather than ALL to mimic our current default (and besides, having row cache opt-in seems like a saner default since for some CF it can do more harm than good). CliClient.showKeyspace() uses "cache:". Let's use "caching:" for consistency sake. you can reuse old cache settings for that purpose Using the old settings on the long run would be weird and confusing, but I do am slightly worried about the pain on upgrade that the new global caches will incur to users, and it could be nice on upgrade to automatically set the value of this option for existing column families based on the preceding setting (basically use the information of whether this CF used to be cached or not). This may not be completely trivial though.
        Hide
        Pavel Yaskevich added a comment -

        v2 - nits fixed and rebased with the latest trunk (last commit 329dd758e8b07368c4bab5451c42dc04b0bb48ae)

        Show
        Pavel Yaskevich added a comment - v2 - nits fixed and rebased with the latest trunk (last commit 329dd758e8b07368c4bab5451c42dc04b0bb48ae)
        Hide
        Sylvain Lebresne added a comment -

        +1

        Show
        Sylvain Lebresne added a comment - +1
        Hide
        Jonathan Ellis added a comment -

        it could be nice on upgrade to automatically set the value of this option for existing column families based on the preceding setting

        Let's follow up in another ticket.

        Show
        Jonathan Ellis added a comment - it could be nice on upgrade to automatically set the value of this option for existing column families based on the preceding setting Let's follow up in another ticket.
        Hide
        Pavel Yaskevich added a comment -

        Committed.

        Show
        Pavel Yaskevich added a comment - Committed.

          People

          • Assignee:
            Pavel Yaskevich
            Reporter:
            Pavel Yaskevich
            Reviewer:
            Sylvain Lebresne
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development