You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "dentiny (via GitHub)" <gi...@apache.org> on 2026/07/29 05:54:22 UTC
[I] bug: C++ binding operator write overwrites the existing object [opendal]
dentiny opened a new issue, #7980:
URL: https://github.com/apache/opendal/issues/7980
### Describe the bug
Hi team, I found for the current operator, writer API always overwrite the existing object, instead append semantics, even if I didn't flush or close it.
### Steps to Reproduce
```diff
hjiang@hjiangs-MacBook-Pro$ git diff
diff --git a/bindings/cpp/tests/basic_test.cpp b/bindings/cpp/tests/basic_test.cpp
index fe07975f7..5b5b9904d 100644
--- a/bindings/cpp/tests/basic_test.cpp
+++ b/bindings/cpp/tests/basic_test.cpp
@@ -139,6 +139,13 @@ OPENDAL_TEST_F(OpenDALTest, ReaderTest) {
EXPECT_EQ(reader_data, data);
}
+OPENDAL_TEST_F(OpenDALTest, WriterTest) {
+ op_.Write("writer_test", "hello ");
+ op_.Write("writer_test", "world");
+
+ EXPECT_EQ(op_.Read("writer_test"), "hello world");
+}
+
OPENDAL_TEST_F(OpenDALTest, ListerTest) {
std::string dir_path = "test_dir/";
op_.CreateDir(dir_path);
```
gets error message
```sh
[ RUN ] OpenDALTest.WriterTest
/Users/hjiang/Desktop/opendal/bindings/cpp/tests/basic_test.cpp:146: Failure
Expected equality of these values:
op_.Read("writer_test")
Which is: "world"
"hello world"
[ FAILED ] OpenDALTest.WriterTest (18 ms)
```
### Expected Behavior
Before I flush or close the operator, new bytes written should be appending existing content instead of overwriting it.
### Additional Context
_No response_
### Are you willing to submit a PR to fix this bug?
- [x] Yes, I would like to submit a PR.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: C++ binding operator write overwrites the existing object [opendal]
Posted by "dentiny (via GitHub)" <gi...@apache.org>.
dentiny commented on issue #7980:
URL: https://github.com/apache/opendal/issues/7980#issuecomment-5113775371
I will check the issue out.
--
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: [I] Feature request: expose multipart upload to C++ binding [opendal]
Posted by "dentiny (via GitHub)" <gi...@apache.org>.
dentiny closed issue #7980: Feature request: expose multipart upload to C++ binding
URL: https://github.com/apache/opendal/issues/7980
--
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