diff --git a/.gitignore b/.gitignore index c3f0616..82d73ff 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ target/ !.mvn/wrapper/maven-wrapper.jar !**/src/main/**/target/ !**/src/test/**/target/ +**/.flattened-pom.xml ### IntelliJ IDEA ### .idea/modules.xml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7bcf58d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.5.0] - 2025-02-11 + +### Fixed +- Loading large objects in chunks. +- .gitignore +- pom revision \ No newline at end of file diff --git a/client/src/main/java/info/frostfs/sdk/services/impl/ObjectClientImpl.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectClientImpl.java index 266b630..25f6251 100644 --- a/client/src/main/java/info/frostfs/sdk/services/impl/ObjectClientImpl.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectClientImpl.java @@ -166,8 +166,10 @@ public class ObjectClientImpl extends ContextAccessor implements ObjectClient { // send the last part and create linkObject if (CollectionUtils.isNotEmpty(sentObjectIds)) { - var largeObjectHeader = - new ObjectHeader(header.getContainerId(), ObjectType.REGULAR, attributes, fullLength, null); + var largeObjectHeader = new ObjectHeader( + header.getContainerId(), ObjectType.REGULAR, attributes, fullLength, header.getVersion() + ); + largeObjectHeader.setOwnerId(header.getOwnerId()); split.setParentHeader(largeObjectHeader); diff --git a/client/src/main/java/info/frostfs/sdk/services/impl/ObjectToolsImpl.java b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectToolsImpl.java index abe6927..f0f4e1c 100644 --- a/client/src/main/java/info/frostfs/sdk/services/impl/ObjectToolsImpl.java +++ b/client/src/main/java/info/frostfs/sdk/services/impl/ObjectToolsImpl.java @@ -105,7 +105,10 @@ public class ObjectToolsImpl extends ContextAccessor implements ToolsClient { split.setParent(ObjectIdMapper.toModel(parentObjectId)); } - grpcSplit.setPrevious(ObjectIdMapper.toGrpcMessage(split.getPrevious())).build(); + if (nonNull(split.getPrevious())) { + grpcSplit.setPrevious(ObjectIdMapper.toGrpcMessage(split.getPrevious())).build(); + } + return grpcHeader.toBuilder().setSplit(grpcSplit.build()).build(); } diff --git a/pom.xml b/pom.xml index d390c12..313d679 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ - 0.4.0 + 0.5.0 11 11 @@ -128,6 +128,30 @@ + + org.codehaus.mojo + flatten-maven-plugin + 1.0.0 + + true + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + \ No newline at end of file