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

feat: Introduced MetaSpec for setting relative expiration #14041

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Dec 15, 2023

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

feat: Introduced MetaSpec for setting relative expiration

This is a compatible change with new feature provided.

  • This commit introduces a new type, MetaSpec, which specifies content
    of the KVMeta to be stored for a key. This new type is particularly
    utilized in upsert requests to enable the setting of relative
    expiration times.

    Previously, the KVMeta type was used directly for this purpose.
    However, to avoid impacting existing storage data types, MetaSpec has
    been specifically added for use in upsert operations. When applying a
    raft-log, a KVMeta is built from MetaSpec.

    Designed with backward compatibility, MetaSpec maintains a serialized
    format compatible with KVMeta, ensuring no disruption to existing
    functionality.

  • We introduce two new types Time and Interval to reprensent
    serde-able time stamp and time interval.

  • Tests are added to ensure meta-service works correctly with API with
    ttl support, but databend-query does not use these API yet.

Changelog

  • New Feature

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Dec 15, 2023
@drmingdrmer drmingdrmer force-pushed the 41-expire-rel branch 15 times, most recently from 7dd80df to 80a59d7 Compare December 16, 2023 04:01
This is a compatible change with new feature provided.

- This commit introduces a new type, `MetaSpec`, which specifies content
  of the `KVMeta` to be stored for a key. This new type is particularly
  utilized in `upsert` requests to enable the setting of relative
  expiration times.

  Previously, the `KVMeta` type was used directly for this purpose.
  However, to avoid impacting existing storage data types, `MetaSpec` has
  been specifically added for use in `upsert` operations. When applying a
  raft-log, a `KVMeta` is built from `MetaSpec`.

  Designed with backward compatibility, `MetaSpec` maintains a serialized
  format compatible with `KVMeta`, ensuring no disruption to existing
  functionality.

- We introduce two new types `Time` and `Interval` to reprensent
  serde-able time stamp and time interval.

- Tests are added to ensure meta-service works correctly with API with
  ttl support, but databend-query does not use these API yet.
Copy link
Member Author

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 13 of 27 files at r1, 13 of 13 files at r2, 5 of 5 files at r3, 1 of 1 files at r4, 18 of 18 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @drmingdrmer)

@drmingdrmer drmingdrmer marked this pull request as ready for review December 16, 2023 07:03
@BohuTANG BohuTANG merged commit a64551c into databendlabs:main Dec 16, 2023
71 checks passed
@drmingdrmer drmingdrmer deleted the 41-expire-rel branch December 16, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants