fix: removing the Limit on the Number of Object Versions (#819) (#892)

removing the Limit on the Number of Object Versions (#819)
This commit is contained in:
shiro.lee
2025-11-19 22:34:26 +08:00
committed by GitHub
parent 44f3f3d070
commit 9b9bbb662b

View File

@@ -531,12 +531,13 @@ impl FileMeta {
return Err(Error::other("file meta version invalid"));
}
// 1000 is the limit of versions TODO: make it configurable
if self.versions.len() + 1 > 1000 {
return Err(Error::other(
"You've exceeded the limit on the number of versions you can create on this object",
));
}
// TODO: make it configurable
// 1000 is the limit of versions
// if self.versions.len() + 1 > 1000 {
// return Err(Error::other(
// "You've exceeded the limit on the number of versions you can create on this object",
// ));
// }
if self.versions.is_empty() {
self.versions.push(FileMetaShallowVersion::try_from(version)?);