Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: add TTL support #25

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Commits on Nov 19, 2021

  1. galaxycachepb: extend proto with expiration time

    Add expiration time in preparation for the TTL feature.
    GiedriusS committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    aeb97c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. *: add TTL functionality

    TTLs are based on expiration in the LRU - during getting if the value is
    expired then it is removed from the LRU and we return nothing. This is
    needed to have short-lived values in a distributed system. To achieve
    this, expand the `valWithStat` struct with `expire time.Time`. Then,
    expand all of the related interfaces:
    - Codecs
    - `setLRUOnEvicted`
    - etc.
    
    Since the HTTP interface returns in the body raw bytes, send the
    expiration timestamp with headers. Expand the test in
    `http/http_test.go` to test whether the keys are being regenerated after
    the timestamp. Copy over a test from mailgun/groupcache for TTLs in the
    LRU.
    GiedriusS committed Nov 22, 2021
    Configuration menu
    Copy the full SHA
    3a32041 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2021

  1. Merge pull request #1 from thanos-community/add_ttl

    *: add TTL functionality
    onprem committed Nov 24, 2021
    Configuration menu
    Copy the full SHA
    ab6f170 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. *: prepare for multi-key fetch

    Upgrade internal interfaces for multi-key fetch:
    
    - Use multi-part HTTP request/response for retrieving data about
    multiple keys. Boundary is randomly generated by Go standard library so
    this seems like the best path;
    - Upgrade gRPC interface to have `repeat string Keys` instead of `string
    Key`. `key` has priority over `keys` but users should use `keys` either
    way.
    
    Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
    GiedriusS committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    7265abb View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2 from thanos-community/prepare_for_multi_key_fetch

    *: prepare for multi-key fetch
    GiedriusS committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    1b81014 View commit details
    Browse the repository at this point in the history
  3. .github: update workflows

    Switch to Go 1.17 && enable golangci-lint.
    
    Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
    GiedriusS committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    6a89f51 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #3 from thanos-community/add_golangci_lint

    .github: update workflows
    GiedriusS committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    e89e7e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. *: update interfaces

    * Add `ValueWithTTL` struct for grouping value with time.Time expiration
    time;
    * Update interfaces to use it;
    * Add stub for multiple key retrieval;
    * Fix golangci-lint errors.
    
    Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
    GiedriusS committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    9b92dfa View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. Merge pull request #4 from thanos-community/upgrade_interfaces

    *: update interfaces
    GiedriusS committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    323e89e View commit details
    Browse the repository at this point in the history