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

chore: Configure TTL for Serving Source Store #1845

Merged
merged 5 commits into from
Jul 17, 2024
Merged

chore: Configure TTL for Serving Source Store #1845

merged 5 commits into from
Jul 17, 2024

Conversation

yhl25
Copy link
Contributor

@yhl25 yhl25 commented Jul 17, 2024

fixes:

  • TTL support for serving store
  • update tonic to v0.12 in servesink

Signed-off-by: Yashash H L <[email protected]>
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 81.35593% with 11 lines in your changes missing coverage. Please review.

Project coverage is 54.36%. Comparing base (def97b8) to head (82d2951).

Files Patch % Lines
serving/src/config.rs 0.00% 10 Missing ⚠️
pkg/apis/numaflow/v1alpha1/serving_source.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1845      +/-   ##
==========================================
+ Coverage   54.27%   54.36%   +0.08%     
==========================================
  Files         283      284       +1     
  Lines       27975    28020      +45     
==========================================
+ Hits        15184    15232      +48     
+ Misses      11886    11875      -11     
- Partials      905      913       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 72 to 81
conn_manager
.send_packed_command(redis::cmd(LPUSH).arg(key).arg(val))
.await
.map(|_| ())
.await?;

// if the ttl is configured, set the key to expire after the specified time
if let Some(ttl) = config().redis.ttl_secs {
conn_manager
.send_packed_command(redis::cmd(EXPIRE).arg(key).arg(ttl))
.await?;
}
Copy link
Member

Choose a reason for hiding this comment

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

use pipelining? meaning, send both the commands together

@yhl25 yhl25 marked this pull request as ready for review July 17, 2024 16:38
@yhl25 yhl25 requested a review from whynowy as a code owner July 17, 2024 16:38
@yhl25 yhl25 requested a review from vigith July 17, 2024 16:38
Signed-off-by: Vigith Maurice <[email protected]>
Comment on lines 300 to 305
// Immediately check existence
let exists: bool = conn_manager
.exists(&key)
.await
.expect("Failed to check existence immediately");
assert!(exists, "Key should exist immediately after saving");
Copy link
Member

Choose a reason for hiding this comment

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

use TTL command to see whether the value has been set. do not sleep. check for existence or TTL being set.

Signed-off-by: Yashash H L <[email protected]>
@vigith vigith merged commit e042287 into main Jul 17, 2024
25 checks passed
@vigith vigith deleted the serving-ttl branch July 17, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants