[#64] Fix for client cut logic #66

Merged
PavelGrossSpb merged 2 commits from PavelGrossSpb/frostfs-sdk-csharp:ClientCutUploadFix into master 2025-04-17 10:48:20 +00:00
10 changed files with 39 additions and 27 deletions

BIN
keyfile.snk Normal file

Binary file not shown.

View file

@ -1,7 +1,4 @@
using System;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("FrostFS.SDK.Tests")]
namespace FrostFS.SDK.Client;

View file

@ -1,8 +1,14 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyCompany("FrostFS.SDK.Client")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")]
[assembly: AssemblyCompany("TrueCloudLab")]
[assembly: InternalsVisibleTo("FrostFS.SDK.Tests, PublicKey=" +
"002400000480000094000000060200000024000052534131000400000100010089b992fb14ebcf"+
"4b85b4b1a3af1897290c52ff85a106035c47dc5604cbaa58ae3180f5c9b8523fee5dd1bb9ea9cf"+
"e15ab287e6239c98d5dfa91615bd77485d523a3a3f65a4e5028454cedd5ac4d9eca6da18b81985"+
"ac6905d33cc64b5a2587050c16f67b71ef8889dbd3c90ef7cc0b06bbbe09886601d195f5db179a"+
"3c2a25b1")]
[assembly: AssemblyFileVersion("1.0.6.0")]
[assembly: AssemblyProduct("FrostFS.SDK.Client")]
[assembly: AssemblyTitle("FrostFS.SDK.Client")]
[assembly: AssemblyVersion("1.0.4")]
[assembly: AssemblyVersion("1.0.6")]

View file

@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<PackageId>FrostFS.SDK.Client</PackageId>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<Description>
C# SDK for FrostFS gRPC native protocol
</Description>
@ -32,6 +32,8 @@
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>.\\..\\..\\keyfile.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>

View file

@ -582,10 +582,11 @@ internal sealed class ObjectServiceProvider(ObjectService.ObjectServiceClient cl
var restPart = (fullLength % (ulong)partSize) > 0 ? 1 : 0;
var objectsCount = fullLength > 0 ? (int)(fullLength / (ulong)partSize) + restPart : 0;
// if the object fits one part, it can be loaded as non-complex object
if (objectsCount == 1)
// if the object fits one part, it can be loaded as non-complex object, but if it is not upload resuming
if (objectsCount == 1 && progressInfo != null && progressInfo.GetLast().Length == 0)
{
args.PutObjectContext.MaxObjectSizeCache = partSize;
args.PutObjectContext.FullLength = fullLength;
var singlePartResult = await PutMultipartStreamObjectAsync(args, default).ConfigureAwait(false);
return singlePartResult.ObjectId;
}

View file

@ -1,8 +1,7 @@
using System.Reflection;
[assembly: AssemblyCompany("FrostFS.SDK.Cryptography")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")]
[assembly: AssemblyCompany("TrueCloudLab")]
[assembly: AssemblyFileVersion("1.0.6.0")]
[assembly: AssemblyProduct("FrostFS.SDK.Cryptography")]
[assembly: AssemblyTitle("FrostFS.SDK.Cryptography")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyVersion("1.0.6.0")]

View file

@ -5,7 +5,7 @@
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<PackageId>FrostFS.SDK.Cryptography</PackageId>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<Description>
Cryptography tools for C# SDK
</Description>
@ -26,6 +26,8 @@
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>.\\..\\..\\keyfile.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>

View file

@ -1,8 +1,7 @@
using System.Reflection;
[assembly: AssemblyCompany("FrostFS.SDK.Protos")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d6fe0344538a223303c9295452f0ad73681ca376")]
[assembly: AssemblyCompany("TrueCloudLab")]
[assembly: AssemblyFileVersion("1.0.6.0")]
[assembly: AssemblyProduct("FrostFS.SDK.Protos")]
[assembly: AssemblyTitle("FrostFS.SDK.Protos")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyVersion("1.0.6.0")]

View file

@ -5,7 +5,7 @@
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<PackageId>FrostFS.SDK.Protos</PackageId>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<Description>
Protobuf client for C# SDK
</Description>
@ -13,19 +13,21 @@
</PropertyGroup>
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
</PropertyGroup>
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>.\\..\\..\\keyfile.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>

View file

@ -10,11 +10,16 @@
</PropertyGroup>
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>.\\..\\..\\keyfile.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
@ -42,5 +47,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>