Skip to content

Commit

Permalink
core: remove "file name too long" limitation
Browse files Browse the repository at this point in the history
* part three, prev. commit: 6603f24

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jan 8, 2025
1 parent c598a74 commit b89781d
Show file tree
Hide file tree
Showing 50 changed files with 133 additions and 68 deletions.
2 changes: 1 addition & 1 deletion ais/daemon.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/earlystart.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/htrun.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/proxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/prxauth.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion ais/test/bucket_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/common_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/dsort_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//nolint:dupl // copy-paste benign and can wait
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/ec_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/objprops_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/promote_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2022=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2022-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/s3/e2e_s3_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package s3_integration provides tests of compatibility with AWS S3
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package s3_test

Expand Down
2 changes: 1 addition & 1 deletion ais/test/s3_compat_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package integration_test.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package integration_test

Expand Down
5 changes: 2 additions & 3 deletions ais/tgtobj.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (poi *putOI) do(resphdr http.Header, r *http.Request, dpq *dpq) (int, error

func (poi *putOI) putObject() (ecode int, err error) {
if lom := poi.lom; lom.IsFntl() {
// override wfqn and shorten (!) lom, both
// fixup fntl
var (
short = lom.ShortenFntl()
saved = lom.PushFntl(short)
Expand Down Expand Up @@ -1021,8 +1021,7 @@ func (goi *getOI) txfini() (ecode int, err error) {
fqn = goi.lom.LBGet() // best-effort GET load balancing (see also mirror.findLeastUtilized())
}
// open
// TODO -- FIXME: use lom.Open() instead of os.Open(); TestECChecksum
lmfh, err = os.Open(fqn)
lmfh, err = goi.lom.OpenFile()
if err != nil {
if os.IsNotExist(err) {
// NOTE: retry only once and only when ec-enabled - see goi.restoreFromAny()
Expand Down
2 changes: 1 addition & 1 deletion ais/utils.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package ais provides core functionality for the AIStore object storage.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package ais

Expand Down
2 changes: 1 addition & 1 deletion api/authn/loadtoken.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn provides AuthN API over HTTP(S)
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package authn

Expand Down
2 changes: 1 addition & 1 deletion bench/tools/aisloader/run.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package aisloader
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/

// AIS loader (aisloader) is a tool to measure storage performance. It's a load
Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/hserv.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn is authentication server for AIStore.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn is authentication server for AIStore.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
2 changes: 1 addition & 1 deletion cmd/authn/mgr.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package authn is authentication server for AIStore.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package main

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/auth_hdlr.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles commands that create entities in the cluster.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/err.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file contains error handlers and utilities.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/etl.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles commands that control running jobs in the cluster.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/get.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles object operations.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/init.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/job_hdlr.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles commands that control running jobs in the cluster.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/ls.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/multiobj.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles object operations.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/object.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file handles object operations.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/smap.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
// This file contains util functions and types.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
5 changes: 5 additions & 0 deletions cmd/cli/cli/verbfobj.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ func putRegular(c *cli.Context, bck cmn.Bck, objName, path string, finfo os.File
}
break
}

if e, ok := err.(*cmn.ErrCreateHreq); ok {
return e
}

e := stripErr(err)
if i < iters-1 {
s := fmt.Sprintf("[#%d] %s: %v - retrying...", i+1, path, e)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cli/yap.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package cli provides easy-to-use commands to manage, monitor, and utilize AIS clusters.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cli

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package config provides types and functions to configure AIS CLI.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package config

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/NVIDIA/aistore/cmd/cli
go 1.23.2

require (
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d
github.com/fatih/color v1.18.0
github.com/json-iterator/go v1.1.12
github.com/onsi/ginkgo/v2 v2.21.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594 h1:Qn1yaBunXuJOSSIC82e9o2YrPi932T8zmlpZmn5hWPU=
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594/go.mod h1:mjhY9OGIZULaC79+iRfzEUvUZw7aIWklJ8um321QVpw=
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d h1:dEWTFT5KVO32GAw68uGfiz4WqOwPP5XVps8l5KZOqa0=
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d/go.mod h1:mjhY9OGIZULaC79+iRfzEUvUZw7aIWklJ8um321QVpw=
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/teb/mountpath.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package teb contains templates and (templated) tables to format CLI output.
/*
* Copyright (c) 2023=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved.
*/
package teb

Expand Down
2 changes: 1 addition & 1 deletion cmd/ishard/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/NVIDIA/aistore/cmd/ishard
go 1.23.2

require (
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d
github.com/json-iterator/go v1.1.12
github.com/vbauerster/mpb/v4 v4.12.2
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/ishard/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc=
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594 h1:Qn1yaBunXuJOSSIC82e9o2YrPi932T8zmlpZmn5hWPU=
github.com/NVIDIA/aistore v1.3.26-0.20250106161132-d8ae4afc3594/go.mod h1:mjhY9OGIZULaC79+iRfzEUvUZw7aIWklJ8um321QVpw=
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d h1:dEWTFT5KVO32GAw68uGfiz4WqOwPP5XVps8l5KZOqa0=
github.com/NVIDIA/aistore v1.3.26-0.20250108155940-8c676ef07b6d/go.mod h1:mjhY9OGIZULaC79+iRfzEUvUZw7aIWklJ8um321QVpw=
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
Expand Down
2 changes: 1 addition & 1 deletion cmn/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package cmn provides common constants, types, and utilities for AIS clients
// and AIStore.
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package cmn

Expand Down
2 changes: 1 addition & 1 deletion cmn/cos/err.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func IsPathErr(err error) (ok bool) {
// "file name too long" errno 0x24 (36); either one of the two possible reasons:
// - len(pathname) > PATH_MAX = 4096
// - len(basename) > 255
func IsFntl(err error) bool {
func IsErrFntl(err error) bool {
return strings.Contains(err.Error(), "too long") && errors.Is(err, syscall.ENAMETOOLONG)
}

Expand Down
2 changes: 1 addition & 1 deletion cmn/k8s/client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package k8s: initialization, client, and misc. helpers
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package k8s

Expand Down
2 changes: 1 addition & 1 deletion cmn/k8s/k8s.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package k8s: initialization, client, and misc. helpers
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package k8s

Expand Down
2 changes: 1 addition & 1 deletion cmn/tests/http_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package test provides tests for common low-level types and utilities for all aistore projects
/*
* Copyright (c) 2018=2025, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2025, NVIDIA CORPORATION. All rights reserved.
*/
package tests_test

Expand Down
Loading

0 comments on commit b89781d

Please sign in to comment.