Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/persistence/cassandra/mutable_state_task_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const (
`and workflow_id = ? ` +
`and run_id = ? ` +
`and visibility_ts = ? ` +
`and task_id > ? ` +
`and task_id <= ?`
`and task_id >= ? ` +
`and task_id < ?`
Comment on lines +79 to +80
Copy link
Member

Choose a reason for hiding this comment

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

is this safe?

Copy link
Member Author

@yycptt yycptt Oct 19, 2022

Choose a reason for hiding this comment

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

Yes. This is the correct behavior, all range queries are [inclusive, exclusive).
Didn't discovered this bug before as the code path is never exercised.

Currently we still don't have any queue using this code path (archival queue will be the first one), but at least there're persistence tests ensuring the correct behavior.


templateGetHistoryScheduledTasksQuery = `SELECT task_data, task_encoding ` +
`FROM executions ` +
Expand Down
Loading