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: drop messages for which datalog doesn't exists #719

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

swanandx
Copy link
Member

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • Formatted with cargo fmt
  • Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why.

Comment on lines -1234 to +1238
// Create a dynamic filter if dynamic_filters are enabled for this connection
let filter_idxs = match filter_idxs {
Some(v) => v,
None if connection.dynamic_filters => {
if filter_idxs.is_empty() {
// Create a dynamic filter if dynamic_filters are enabled for this connection
if connection.dynamic_filters {
let (idx, _cursor) = datalog.next_native_offset(topic);
vec![idx]
filter_idxs = vec![idx];
} else {
warn!(topic, "no datalog found for topic, dropping message");
Copy link

Choose a reason for hiding this comment

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

hmm with this we would be returning (0, 0) would that be valid?

Copy link
Member Author

Choose a reason for hiding this comment

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

it was the existing behaviour, so didn't change it. If we return error, we have to add a check again so we don't disconnect the client.

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.

None yet

2 participants