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

Xload prefetch initial code #1585

Merged
merged 63 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7ed70c3
Creating component
vibhansa-msft Apr 12, 2024
88ec516
Cleanup
vibhansa-msft Apr 12, 2024
3cbfc73
cleanup'
vibhansa-msft Apr 12, 2024
5019e96
Updating copyright statement
souravgupta-msft Apr 12, 2024
1dc590e
Adding block
vibhansa-msft Apr 12, 2024
0f14e2a
Adding block and blockpool
vibhansa-msft Apr 12, 2024
1c7e914
Merge branch 'feature/xload' of https://github.com/Azure/azure-storag…
vibhansa-msft Apr 12, 2024
4a54134
Adding threadpool
vibhansa-msft Apr 12, 2024
c309894
Base code
vibhansa-msft Apr 13, 2024
c60bad0
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Apr 15, 2024
d0bfd1b
changing mode type to enum
souravgupta-msft Apr 15, 2024
cad5756
changing mode type to enum (#1386)
souravgupta-msft Apr 16, 2024
141a549
Adding splitter logic
vibhansa-msft Apr 17, 2024
741a0ca
local listing
souravgupta-msft Apr 22, 2024
2329c4b
Added splitter logic
vibhansa-msft Apr 22, 2024
dc31b1e
Correct error handling
vibhansa-msft Apr 22, 2024
3d9357f
Sync with lister
vibhansa-msft Apr 22, 2024
0e90768
Updated
vibhansa-msft Apr 22, 2024
84b562e
Error handling
vibhansa-msft Apr 22, 2024
60cb00e
Adding remote lister
souravgupta-msft Apr 22, 2024
68e4bd8
log correction
souravgupta-msft Apr 22, 2024
a7b545f
sample
souravgupta-msft May 6, 2024
3faa5f2
lister
souravgupta-msft May 13, 2024
360bbec
adding xlister
souravgupta-msft Jun 7, 2024
e153b3f
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Jun 11, 2024
73a444c
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Jun 18, 2024
a5eca7a
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Jul 2, 2024
1f43c23
check
souravgupta-msft Jul 2, 2024
a840414
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Sep 24, 2024
93f0224
temp
souravgupta-msft Sep 24, 2024
26d19c9
test
souravgupta-msft Oct 7, 2024
9fb087e
code
souravgupta-msft Oct 9, 2024
177a177
more code
souravgupta-msft Oct 10, 2024
3243675
refactor
souravgupta-msft Oct 16, 2024
c27ed4b
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Oct 29, 2024
2aaca33
changes
souravgupta-msft Nov 4, 2024
4c18f76
xload to azstorage
souravgupta-msft Nov 4, 2024
3483983
sync with main
souravgupta-msft Nov 19, 2024
20c4853
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Nov 21, 2024
96e0968
changes
souravgupta-msft Nov 25, 2024
96a8e28
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Nov 25, 2024
9c054d3
more logs
souravgupta-msft Nov 27, 2024
523b64b
changes
souravgupta-msft Nov 27, 2024
2f9e8ec
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Dec 2, 2024
0f462cd
config
souravgupta-msft Dec 3, 2024
6ed0cb3
add readonly check
souravgupta-msft Dec 3, 2024
34e567e
Merge branch 'main' of https://github.com/Azure/azure-storage-fuse in…
souravgupta-msft Dec 4, 2024
a7c8fe2
Removing upload code
souravgupta-msft Dec 4, 2024
dd4840b
go version update
souravgupta-msft Dec 4, 2024
6f5121b
copyright fix
souravgupta-msft Dec 4, 2024
17a9985
Merge branch 'feature/xload' of https://github.com/Azure/azure-storag…
souravgupta-msft Dec 30, 2024
ce69c5e
refactoring
souravgupta-msft Dec 30, 2024
16eb04c
refactor
souravgupta-msft Dec 30, 2024
db6ffcc
Merge branch 'feature/xload' of https://github.com/Azure/azure-storag…
souravgupta-msft Jan 3, 2025
151a2fa
update copyright statements
souravgupta-msft Jan 3, 2025
e1db656
Adding fio config to generate files in parallel
vibhansa-msft Jan 17, 2025
fde22ea
review comments
souravgupta-msft Jan 27, 2025
a0f7ad8
review comments
souravgupta-msft Jan 28, 2025
f792e7d
review comments
souravgupta-msft Jan 29, 2025
7a9010b
review comments
souravgupta-msft Jan 30, 2025
4b34833
update mode and lmt as per blob properties
souravgupta-msft Jan 30, 2025
cce3a95
change
souravgupta-msft Jan 30, 2025
1e139aa
file mode
souravgupta-msft Feb 2, 2025
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
4 changes: 4 additions & 0 deletions component/xload/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ package common
import (
"os"
"reflect"
"time"

"github.com/JeffreyRichter/enum/enum"
)
Expand All @@ -51,6 +52,9 @@ type WorkItem struct {
CompName string // Name of the component
Path string // Name of the file being processed
DataLen uint64 // Length of the data to be processed
Mode os.FileMode // permissions in 0xxx format
Atime time.Time // access time
Mtime time.Time // modified time
Block *Block // Block to hold data for
FileHandle *os.File // File handle to the file being processed
Err error // Error if any
Expand Down
3 changes: 3 additions & 0 deletions component/xload/comp/lister.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func (rl *remoteLister) Process(item *common.WorkItem) (int, error) {
CompName: rl.GetNext().GetName(),
Path: entry.Path,
DataLen: uint64(entry.Size),
Mode: entry.Mode,
Atime: entry.Atime,
Mtime: entry.Mtime,
})
}
}
Expand Down
9 changes: 8 additions & 1 deletion component/xload/comp/splitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (d *downloadSplitter) Process(item *common.WorkItem) (int, error) {
// TODO:: xload : should we delete the file if it already exists
// TODO:: xload : what should be the flags and mode and should we allocate the full size to the file
// TODO:: xload : handle case if blob is a symlink
item.FileHandle, err = os.OpenFile(localPath, os.O_WRONLY|os.O_CREATE, 0644)
item.FileHandle, err = os.OpenFile(localPath, os.O_WRONLY|os.O_CREATE, item.Mode)
if err != nil {
vibhansa-msft marked this conversation as resolved.
Show resolved Hide resolved
log.Err("downloadSplitter::Process : Failed to create file %s [%s]", item.Path, err.Error())
return -1, fmt.Errorf("failed to open file %s [%s]", item.Path, err.Error())
Expand Down Expand Up @@ -197,6 +197,13 @@ func (d *downloadSplitter) Process(item *common.WorkItem) (int, error) {

wg.Wait()

// update the last modified time
err = os.Chtimes(localPath, item.Atime, item.Mtime)
if err != nil {
log.Err("downloadSplitter::Process : Failed to change times of file %s [%s]", item.Path, err.Error())
operationSuccess = false
souravgupta-msft marked this conversation as resolved.
Show resolved Hide resolved
}

if !operationSuccess {
souravgupta-msft marked this conversation as resolved.
Show resolved Hide resolved
log.Err("downloadSplitter::Process : Failed to download data for file %s, so deleting it from local path", item.Path)

Expand Down