Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class ConcurrentPerPartitionCursor(Cursor):
_NO_CURSOR_STATE: Mapping[str, Any] = {}
_GLOBAL_STATE_KEY = "state"
_PERPARTITION_STATE_KEY = "states"
_IS_PARTITION_DUPLICATION_LOGGED = False
Comment thread
lazebnyi marked this conversation as resolved.
_KEY = 0
_VALUE = 1

Expand Down Expand Up @@ -279,7 +280,13 @@ def _generate_slices_from_partition(
with self._lock:
self._number_of_partitions += 1
self._cursor_per_partition[partition_key] = cursor
self._semaphore_per_partition[partition_key] = threading.Semaphore(0)

if partition_key in self._semaphore_per_partition:
if not self._IS_PARTITION_DUPLICATION_LOGGED:
logger.warning(f"Partition duplication detected for stream {self._stream_name}")
self._IS_PARTITION_DUPLICATION_LOGGED = True
else:
self._semaphore_per_partition[partition_key] = threading.Semaphore(0)

Comment thread
lazebnyi marked this conversation as resolved.
with self._lock:
if (
Expand Down
Loading