You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "hoslo (via GitHub)" <gi...@apache.org> on 2024/02/04 03:53:10 UTC
[PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
hoslo opened a new pull request, #4141:
URL: https://github.com/apache/opendal/pull/4141
fixes #4058
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477182341
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::LoggingLayer;
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+use tracing_subscriber;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ tracing_subscriber::fmt::init();
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
+ .layer(LoggingLayer::default())
Review Comment:
The order of layers is important. Please add the logging layer first, then add retry.
Also, please change log level to `trace` to get more deep logs.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun closed pull request #4141: fix(services/fs,hdfs): fix poll_close when retry
URL: https://github.com/apache/opendal/pull/4141
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477185552
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::LoggingLayer;
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+use tracing_subscriber;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ tracing_subscriber::fmt::init();
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
+ .layer(LoggingLayer::default())
Review Comment:
Yes, we should encounter an error, but we don't. Something must be wrong.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1925579347
> I understand, is there anything wrong with the test I added? Never written this before.
We can add
```yaml
env:
RUST_BACKTRACE=1
```
before `jobs` so we can have backtrace while error triggered.
And our tests failed for close succeed without error which is not expected.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1925578281
Hi, @hoslo, it's best to avoid force-pushing so we can track the changes made since the last commit. We will squash all the commits while merging.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477174940
##########
core/edge/file_close_with_retry_on_full_disk/Cargo.toml:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]
+edition = "2021"
+name = "edge_file_close_with_retry_on_full_disk"
+publish = false
+version = "0.0.0"
+
+license.workspace = true
Review Comment:
Please rebase with latest main branch and remove the workspace here.
##########
.github/workflows/test_edge.yml:
##########
@@ -33,6 +33,31 @@ on:
- ".github/workflows/edge_test.yml"
jobs:
+ test_file_close_with_retry_on_full_disk:
Review Comment:
Please add this test at the end of this file.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "hoslo (via GitHub)" <gi...@apache.org>.
hoslo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1975811396
> Hi, @hoslo, could you fixing the HDFS issue first? We have a user facing the exact same problem.
>
> We can fix the fs part later.
I created a new PR for hdfs close, plz check it.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477182341
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::LoggingLayer;
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+use tracing_subscriber;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ tracing_subscriber::fmt::init();
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
+ .layer(LoggingLayer::default())
Review Comment:
The order of layers is important. Please add the logging layer first, then add retry.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "hoslo (via GitHub)" <gi...@apache.org>.
hoslo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477185028
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::LoggingLayer;
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+use tracing_subscriber;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ tracing_subscriber::fmt::init();
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
+ .layer(LoggingLayer::default())
Review Comment:
Strange, shouldn't it return an error based on the logs?
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1972698644
Hi, @hoslo, could you fixing the HDFS issue first? We have a user facing the exact same problem.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-2029270923
Closed as stale, conflict and superseded.
If the fs case is yet to be resolved, we should open a new PR instead.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477179331
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,48 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
Review Comment:
Let's add a logging here so that we know what happened. And also set `RUST_LOG` to debug.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "hoslo (via GitHub)" <gi...@apache.org>.
hoslo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1925578878
> Hi, @hoslo, it's best to avoid force-pushing so we can track the changes made since the last commit. We will squash all the commits while merging.
I understand, is there anything wrong with the test I added? Never written this before.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4141:
URL: https://github.com/apache/opendal/pull/4141#issuecomment-1925673768
Hi, @hoslo, I reported the issue to tokio instead: https://github.com/tokio-rs/tokio/issues/6325
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "hoslo (via GitHub)" <gi...@apache.org>.
hoslo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477181207
##########
core/edge/file_close_with_retry_on_full_disk/src/main.rs:
##########
@@ -0,0 +1,48 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::env;
+
+use opendal::layers::RetryLayer;
+use opendal::services::Fs;
+use opendal::Operator;
+use opendal::Result;
+use rand::prelude::*;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ let mut builder = Fs::default();
+ builder.root(&env::var("OPENDAL_FS_ROOT").expect("root must be set for this test"));
+ let op = Operator::new(builder)?
+ .layer(RetryLayer::new().with_max_times(3))
Review Comment:
It looks like it should return an error, but it returns ok.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(services/fs,hdfs): fix poll_close when retry [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4141:
URL: https://github.com/apache/opendal/pull/4141#discussion_r1477181164
##########
core/edge/file_close_with_retry_on_full_disk/Cargo.toml:
##########
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[package]
+edition = "2021"
+license = "Apache-2.0"
+name = "edge_file_close_with_retry_on_full_disk"
+publish = false
+rust-version = "1.67"
+version = "0.0.0"
+
+[dependencies]
+futures = "0.3"
+opendal = { path = "../../" }
+rand = "0.8"
+tokio = { version = "1", features = ["full"] }
Review Comment:
ok, let's add `tracing_subscriber` here to collect the logs:
```toml
[dependencies]
tracing-subscriber = "0.3"
```
```rust
use tracing_subscriber;
tracing_subscriber::fmt::init();
```
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org