qzyu999 commented on PR #438:
URL: https://github.com/apache/fluss-rust/pull/438#issuecomment-4189764422
> TY for the PR. Left a few minor comments, PTAL.
Hi @leekeiabstraction, I updated the code to use a global
`DEFAULT_POLL_INTERVAL_MS=1000` at the top, rather than have the
`timeout_ms=1000` as a magic number within the function, where
`DEFAULT_POLL_INTERVAL_MS` is then referenced within the function. I agree that
the magic number issue isn't ideal and I believe this is a suitable fix.
In an unrelated change, I noticed that the code was no longer compiling when
running `uv run maturin develop`, seems like the following code:
```python
#[pyclass]
pub struct LogScanner {
...
admin: fcore::client::FlussAdmin,
```
requires being updated to
```python
#[pyclass]
pub struct LogScanner {
...
admin: Arc<fcore::client::FlussAdmin>,
```
in order to compile properly. I believe there were some changes on the
`main` branch that required this to happen. Looking at the git history, it
seems that in 3bd6b1b392b767c2760e95db671ef6aa90e3bafa (I saw some later
changes to this also, but this is the breaking change), the update was made to
change (in `connection.rs`):
```rust
pub async fn get_admin(&self) -> Result<FlussAdmin> {
```
to
```rust
pub async fn get_admin(&self) -> Result<Arc<FlussAdmin>> {
```
PTAL and let me know what you think about these solutions, thanks!
--
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]