Skip to content

Conversation

@VadimPlh
Copy link
Contributor

@VadimPlh VadimPlh commented Nov 9, 2022

We wanna test how transaction works with retention
For first step we added this type of testing inside the simplest tx_single_reads_writes scenario, because in this case we read not so far from tail. And should not read data from deleted segment

For this we need to set small segment set for topic and also put small retention period.

@VadimPlh VadimPlh requested review from bharathv and rystsov November 9, 2022 12:58
Copy link
Contributor

@rystsov rystsov left a comment

Choose a reason for hiding this comment

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

it isn't so simple, we also need to read the log in the end and make sure that:

  • there is a gap in the begging of what's read comparing to what's written
  • what's read is what's was written
  • there is no gaps after the initial gap

that logic should be in harness/chaos/workloads/tx_single_reads_writes/consistency.py it doesn't do much so you may use harness/chaos/workloads/reads_writes/consistency.py as an example

# waiting for the controller to be up before creating a topic
self.redpanda_cluster.wait_leader("controller", namespace="redpanda", replication=len(self.redpanda_cluster.nodes), timeout_s=30)

retention_ms = 604800000
Copy link
Contributor

Choose a reason for hiding this comment

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

retention_ms = self.read_config(["retention_ms"], 604800000)

if self.config.get("retention_ms") != None:
retention_ms = self.config["retention_ms"]

segment_bytes = 1073741824
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants