Skip to content

Conversation

@gpauloski
Copy link
Collaborator

Description

This would happen when a StreamProducer is closed and there are no objects in the current batch buffer. A lot of connector implementations, such as the ones used to test the StreamProducer, are okay with put_batch([]) but the RedisConnector raises an error here. Maybe in the future we should support empty batches in put_batch() as a part of the Connector protocol, but it is definitely not needed to call put_batch in the StreamProducer in this case.

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

All test pass and verified the fix solved the problem in the benchmark suite that I ran into with Redis.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

This would happen when a StreamProducer is closed and there are no
objects in the current batch buffer. A lot of connector implementations,
such as the ones used to test the StreamProducer, are okay with
put_batch([]) but the RedisConnector raises an error here. Maybe in the
future we should support empty batches in put_batch() as a part of the
Connector protocol, but it is definitely not needed to call put_batch in
the StreamProducer in this case.
@gpauloski gpauloski added the bug Error, flaw, or fault that causes unexpected behavior label Mar 3, 2024
@gpauloski gpauloski merged commit cedd218 into main Mar 3, 2024
@gpauloski gpauloski deleted the stream-close-error branch March 3, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Error, flaw, or fault that causes unexpected behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants