Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup the RAWX #2017

Merged
merged 26 commits into from
Apr 23, 2020
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b62852b
rawx: Better syslog usage
jfsmig Apr 14, 2020
ac74480
rawx/beanstalkd: Remove unused code, Avoid string to bytes conversions
jfsmig Apr 15, 2020
2978f9a
rawx: Help the GC, prevent escape to the heap
jfsmig Apr 15, 2020
4071476
rawx: Lighter log management, Rename a config directive
jfsmig Apr 16, 2020
4cdb58a
rawx: Avoid a useless indirection
jfsmig Apr 16, 2020
6789273
rawx: Lighter heap usage
jfsmig Apr 16, 2020
2557ee8
oio-rawxr-harass: allow to reuse the connections
jfsmig Apr 16, 2020
453927e
rawx: Apply go fmt
jfsmig Apr 16, 2020
dcfbea5
rawx: Avoid the heap when loading the fullpath xattr
jfsmig Apr 16, 2020
81db5d7
rawx: Remove a warning is the error is reported
jfsmig Apr 16, 2020
cfad4fc
rawx: Avoid hitting the heap for an annoying trace
jfsmig Apr 16, 2020
1f3b6c7
rawx: Parallelize on several beanstalkd connections
jfsmig Apr 16, 2020
cad5b97
rawx: Update the copyright mentions
jfsmig Apr 16, 2020
cf98037
rawx: Allow to turn events down (config)
jfsmig Apr 16, 2020
867ed7f
rawx: Remove unused code and parameters
jfsmig Apr 16, 2020
22353ae
rawx: Simplify a statement
jfsmig Apr 16, 2020
8308b92
rawx: Simplify some always-true conditions
jfsmig Apr 16, 2020
1559838
rawx: Adapt to older versions of Go
jfsmig Apr 16, 2020
d5a2fdf
rawx: Fix the range header format
jfsmig Apr 16, 2020
a6a49dd
rawx: Less pointers, More structure passing
jfsmig Apr 17, 2020
a6f1d0d
rawx: Fix an error generation
jfsmig Apr 17, 2020
d8c299f
rawx: Lighter error message
jfsmig Apr 17, 2020
ea76ea1
rawx: Fix an error code upon HEAD
jfsmig Apr 17, 2020
db22395
rawx: Fix the open() flags used to just fsync
jfsmig Apr 21, 2020
514c5cb
rawx: Centralize in the repo the logic around sync* flags
jfsmig Apr 21, 2020
694c8ac
rawx: Apply 'go fmt'
jfsmig Apr 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rawx: Avoid the heap when loading the fullpath xattr
  • Loading branch information
jfsmig committed Apr 16, 2020
commit dcfbea5be50ca1e62afb2ea9b0074ca889b2627f
25 changes: 12 additions & 13 deletions rawx/chunk_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ func (chunk chunkInfo) saveAttr(out decorable) error {

func loadFullPath(getter func(string, string) (string, error), chunkID string) (chunkInfo, error) {
var chunk chunkInfo
getAttr := func(k string) (string, error) { return getter(chunkID, k) }

chunk.ChunkID = chunkID

fp, err := getAttr(AttrNameFullPrefix + chunkID)
fp, err := getter(chunkID, xattrKey(chunkID))
if err == nil {
// New chunk
fpTokens := strings.Split(fp, "/")
Expand All @@ -128,18 +127,18 @@ func loadFullPath(getter func(string, string) (string, error), chunkID string) (
if err != syscall.ENODATA {
return chunk, err
}
detailedAttrs := []detailedAttr{
{AttrNameContainerID, &chunk.ContainerID},
{AttrNameContentPath, &chunk.ContentPath},
{AttrNameContentVersion, &chunk.ContentVersion},
{AttrNameContentID, &chunk.ContentID},
}
for _, hs := range detailedAttrs {
value, err := getAttr(hs.key)
if err != nil && err != syscall.ENODATA {
return chunk, err
chunk.ContainerID, err = getter(chunkID, AttrNameContainerID)
if err == nil {
chunk.ContentPath, err = getter(chunkID, AttrNameContentPath)
if err == nil {
chunk.ContentVersion, err = getter(chunkID, AttrNameContentVersion)
if err == nil {
chunk.ContentID, err = getter(chunkID, AttrNameContentID)
}
}
*(hs.ptr) = value
}
if err != nil && err != syscall.ENODATA {
return chunk, err
}
}

Expand Down