Copilot commented on code in PR #257:
URL: https://github.com/apache/fluss-rust/pull/257#discussion_r2771555567
##########
crates/fluss/src/client/table/scanner.rs:
##########
@@ -409,6 +409,19 @@ impl LogScannerInner {
Ok(())
}
+ async fn unsubscribe_partition(&self, partition_id: PartitionId, bucket:
i32) -> Result<()> {
+ if !self.is_partitioned_table {
+ return Err(Error::UnsupportedOperation {
+ message: "Can't unsubscribe a partition for a non-partitioned
table.".to_string(),
+ });
+ }
+ let table_bucket =
+ TableBucket::new_with_partition(self.table_id, Some(partition_id),
bucket);
+ self.log_scanner_status
+ .unassign_scan_buckets(from_ref(&table_bucket));
+ Ok(())
+ }
Review Comment:
The new unsubscribe_partition method lacks test coverage. Consider adding
tests similar to the existing subscribe_partition tests in log_table.rs (line
1111). Tests should verify that: 1) unsubscribe_partition correctly removes a
partitioned bucket from tracking, 2) it returns an error when called on a
non-partitioned table, and 3) after unsubscribing, the scanner no longer polls
for records from that partition bucket.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]