-
Notifications
You must be signed in to change notification settings - Fork 4
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
Row-level TTL PR 6: TopologyTestDriver #376
Changes from all commits
d654026
b8657f3
7a1314f
365d274
47d2638
8d27534
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,22 +97,21 @@ public ResponsiveTopologyTestDriver( | |
topology, | ||
config, | ||
initialWallClockTime, | ||
new TTDCassandraClient( | ||
new TTDMockAdmin(baseProps(config), topology), | ||
mockTime(initialWallClockTime)) | ||
new TTDCassandraClient(new TTDMockAdmin(baseProps(config), topology)) | ||
); | ||
} | ||
|
||
/** | ||
* Advances the internal mock time used for Responsive-specific features such as ttl, as well | ||
* as the mock time used for various Kafka Streams functionality such as wall-clock punctuators. | ||
* Advances the internal mock time which can be used to trigger some Kafka Streams | ||
* functionality such as wall-clock punctuators, or force Responsive to flush | ||
* its internal buffers. | ||
Comment on lines
+105
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks to this "hack" we no longer require users to use this method to advance wall clock time and manually flush the CommitBuffer in their TTD apps. Generally this is only used for triggering punctuation in Streams so most people wouldn't already be using this in their apps, and will advance time via record timestamps |
||
* See {@link TopologyTestDriver#advanceWallClockTime(Duration)} for more details. | ||
* | ||
* @param advance the amount of time to advance wall-clock time | ||
*/ | ||
@Override | ||
public void advanceWallClockTime(final Duration advance) { | ||
client.advanceWallClockTime(advance); | ||
client.flush(); | ||
super.advanceWallClockTime(advance); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it's worth noting that this table implementation doesn't actually apply ttl in terms of retention, only in terms of filtering results. I figure this is fine for the TTD since such test should be short-lived, but good to note in case we ever want to do anything else with this class 🤷♀️