SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
go fmt
Chris Lued0acd17227c
diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.goindex 757016a55a..cdfd8be1d0 100644--- a/weed/s3api/auth_signature_v4.go+++ b/weed/s3api/auth_signature_v4.go@@ -48,7 +48,7 @@ func (iam *IdentityAccessManagement) reqSignatureV4Verify(r *http.Request) (*Ideconst (emptySHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"streamingContentSHA256 = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"- signV4ChunkedAlgorithm = "AWS4-HMAC-SHA256-PAYLOAD"+ signV4ChunkedAlgorithm = "AWS4-HMAC-SHA256-PAYLOAD"// http Header "x-amz-content-sha256" == "UNSIGNED-PAYLOAD" indicates that the// client did not calculate sha256 of the payload.diff --git a/weed/s3api/auto_signature_v4_test.go b/weed/s3api/auto_signature_v4_test.goindex 0502d105c4..036b5c052f 100644--- a/weed/s3api/auto_signature_v4_test.go+++ b/weed/s3api/auto_signature_v4_test.go@@ -54,7 +54,6 @@ func TestIsRequestPresignedSignatureV4(t *testing.T) {}}-// Tests is requested authenticated function, tests replies for s3 errors.func TestIsReqAuthenticated(t *testing.T) {iam := NewIdentityAccessManagement("", "")diff --git a/weed/s3api/s3api_auth.go b/weed/s3api/s3api_auth.goindex 43afbaae5d..bf5cf5fab8 100644--- a/weed/s3api/s3api_auth.go+++ b/weed/s3api/s3api_auth.go@@ -26,7 +26,7 @@ func isRequestSignatureV4(r *http.Request) bool {// Verify if request has AWS Signature Version '2'.func isRequestSignatureV2(r *http.Request) bool {return !strings.HasPrefix(r.Header.Get("Authorization"), signV4Algorithm) &&- strings.HasPrefix(r.Header.Get("Authorization"), signV2Algorithm)+ strings.HasPrefix(r.Header.Get("Authorization"), signV2Algorithm)}// Verify if request has AWS PreSign Version '4'.diff --git a/weed/shell/command_fs_mv.go b/weed/shell/command_fs_mv.goindex 78f797f6c5..9b74e85e9d 100644--- a/weed/shell/command_fs_mv.go+++ b/weed/shell/command_fs_mv.go@@ -63,7 +63,7 @@ func (c *commandFsMv) Do(args []string, commandEnv *CommandEnv, writer io.Writervar targetDir, targetName string// moving a file or folder- if err == nil && respDestinationLookupEntry.Entry!= nil && respDestinationLookupEntry.Entry.IsDirectory {+ if err == nil && respDestinationLookupEntry.Entry != nil && respDestinationLookupEntry.Entry.IsDirectory {// to a directorytargetDir = filepath.ToSlash(filepath.Join(destinationDir, destinationName))targetName = sourceNamediff --git a/weed/storage/store.go b/weed/storage/store.goindex 2d02e2f806..e29680f6f3 100644--- a/weed/storage/store.go+++ b/weed/storage/store.go@@ -358,7 +358,7 @@ func (s *Store) ConfigureVolume(i needle.VolumeId, replication string) error {}// load, modify, savebaseFileName := strings.TrimSuffix(fileInfo.Name(), filepath.Ext(fileInfo.Name()))- vifFile := filepath.Join(location.Directory, baseFileName + ".vif")+ vifFile := filepath.Join(location.Directory, baseFileName+".vif")volumeInfo, _, err := pb.MaybeLoadVolumeInfo(vifFile)if err != nil {return fmt.Errorf("volume %d fail to load vif", i)diff --git a/weed/storage/volume_super_block.go b/weed/storage/volume_super_block.goindex 1d7f35595d..5e913e062d 100644--- a/weed/storage/volume_super_block.go+++ b/weed/storage/volume_super_block.go@@ -37,7 +37,7 @@ func (v *Volume) maybeWriteSuperBlock() error {func (v *Volume) readSuperBlock() (err error) {v.SuperBlock, err = super_block.ReadSuperBlock(v.DataBackend)- if v.volumeInfo != nil && v.volumeInfo.Replication != ""{+ if v.volumeInfo != nil && v.volumeInfo.Replication != "" {if replication, err := super_block.NewReplicaPlacementFromString(v.volumeInfo.Replication); err != nil {return fmt.Errorf("Error parse volume %d replication %s : %v", v.Id, v.volumeInfo.Replication, err)} else {diff --git a/weed/util/grpc_client_server.go b/weed/util/grpc_client_server.goindex dc896ccb44..d6a9ee3c37 100644--- a/weed/util/grpc_client_server.go+++ b/weed/util/grpc_client_server.go@@ -29,7 +29,7 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server {Time: 10 * time.Second, // wait time before ping if no activityTimeout: 20 * time.Second, // ping timeout}), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{- MinTime: 60 * time.Second, // min time a client should wait before sending a ping+ MinTime: 60 * time.Second, // min time a client should wait before sending a pingPermitWithoutStream: true,}))for _, opt := range opts {@@ -47,8 +47,8 @@ func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*groptions = append(options,// grpc.WithInsecure(),grpc.WithKeepaliveParams(keepalive.ClientParameters{- Time: 30 * time.Second, // client ping server if no activity for this long- Timeout: 20 * time.Second,+ Time: 30 * time.Second, // client ping server if no activity for this long+ Timeout: 20 * time.Second,PermitWithoutStream: true,}))for _, opt := range opts {