You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "erickguan (via GitHub)" <gi...@apache.org> on 2025/03/23 20:31:36 UTC
[I] bug: the behavior tests try to create huge files when setting a huge `write_total_max_size` for a service [opendal]
erickguan opened a new issue, #5858:
URL: https://github.com/apache/opendal/issues/5858
### Describe the bug
When setting a huge `write_total_max_size` in a `native_capability`, the behavior tests will try to allocate huge memory regions.
Read functions in `core/tests/behavior/utils.rs`.
### Steps to Reproduce
1. Add `write_total_max_size: Some(100*1024*1024*1024)` to a service's capability. For example, in `core/src/services/fs/backend.rs`.
2. Run behavior tests:
```
OPENDAL_FS_ROOT=/tmp/a OPENDAL_TEST=fs cargo test behavior::test \
--features tests,services-fs \
-- \
--show-output
```
3. Tests show:
```
running 146 tests
memory allocation of 83268712952 bytes failed
memory allocation of 83385328405 bytes failed
memory allocation of 86869557384 bytes failed
memory allocation of 71047600905 bytes failed
```
### Expected Behavior
1. Behavior tests perform properly.
2. Don't create huge files in the behavior tests.
### Additional Context
_No response_
### Are you willing to submit a PR to fix this bug?
- [ ] 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: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "erickguan (via GitHub)" <gi...@apache.org>.
erickguan commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2753550058
I tested Cloudflare’s D1 database, and I found that the maximum size is just over 2 MB. However, Cloudflare’s documentation does not accurately reflect this limit.
Considerations on the Use Cases
Users pay for their storage, so someone will eventually need to look into the maximum limit. Service providers set caps for various reasons—such as sensible defaults or implementation limitations—and the service will return errors if the limit is exceeded. When working with a service, it's easy to know this. OpenDAL could generate an error if someone wants that.
That said, it is frustrating that the maximum size limit can be inconvenient when copying data across services.
Tests
I agree with using an environment variable. Additionally, GitHub’s runners have limited memory, so we cannot use all the available memory at once without risking an out-of-memory (OOM) error.
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #5858: bug: behavior tests try to create huge files with large `write_total_max_size`
URL: https://github.com/apache/opendal/issues/5858
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-5244843580
Closing as completed. The current behavior-test generator caps generated content at DEFAULT_CONTENT_MAX_SIZE through content_max_size, even when write_total_max_size is larger. This landed in #7585 (edd6686c9e), so the huge-allocation path reported here no longer exists.
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "yihong0618 (via GitHub)" <gi...@apache.org>.
yihong0618 commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2746751393
> It seems that even S3 didn't set this value.
>
> I feel like it doesn't make sense to provide such a capability directly in services. It also overlaps somewhat with `write_multi_max_size`.
>
> We need to re-think about this capability.
for now only d1 and nebula service use it. maybe we can change it in other side
but I do not think nebula really need 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: [I] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "yihong0618 (via GitHub)" <gi...@apache.org>.
yihong0618 commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2746775592
> This issue can connect to [#5846](https://github.com/apache/opendal/issues/5846).
>
> Maybe what we need is simply to control our test cases instead of relying on a public API capabilities API. It should be good if we have something like `OPENDAL_TEST_MAX_SIZE`.
cool
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "yihong0618 (via GitHub)" <gi...@apache.org>.
yihong0618 commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2746763039
> It seems that even S3 didn't set this value.
>
> I feel like it doesn't make sense to provide such a capability directly in services. It also overlaps somewhat with `write_multi_max_size`.
>
> We need to re-think about this capability.
I wrote for drop the write_multi_max_size, and make a special case for d1 because i searched code base
it seems only used in behavior tests?
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "yihong0618 (via GitHub)" <gi...@apache.org>.
yihong0618 commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2749742451
This can be done by dropping write_multi_max_size since #5859 is not a good fix
after dropping write_multi_max_size
two ways to fix the flaky tests (for d1 and nebula)
1. use special case for them in gen_bytes
2. OPENDAL_TEST_MAX_SIZE
I am not quite sure which one is better, OPENDAL_TEST_MAX_SIZE will bring new env and special case is not
so easy to change
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2746747404
It seems that even S3 didn't set this value.
I feel like it doesn't make sense to provide such a capability directly in services. It also overlaps somewhat with `write_multi_max_size`.
We need to re-think about this capability.
--
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] bug: behavior tests try to create huge files with large `write_total_max_size` [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5858:
URL: https://github.com/apache/opendal/issues/5858#issuecomment-2746773035
This issue can connect to https://github.com/apache/opendal/issues/5846.
Maybe what we need is simply to control our test cases instead of relying on a public API capabilities API. It should be good if we have something like `OPENDAL_TEST_MAX_SIZE`.
--
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