[PR #683] [MERGED] Store object data natively and metadata in xattr #823

Closed
opened 2026-03-03 12:31:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/683
Author: @gaul
Created: 2/12/2022
Status: Merged
Merged: 2/15/2022
Merged by: @fsouza

Base: mainHead: fs/xattr


📝 Commits (1)

  • 0e3aff1 Store object data natively and metadata in xattr

📊 Changes

7 files changed (+119 additions, -10 deletions)

View changed files

📝 fakestorage/bucket_test.go (+10 -1)
📝 go.mod (+1 -0)
📝 go.sum (+3 -0)
📝 internal/backend/backend_test.go (+10 -1)
📝 internal/backend/fs.go (+33 -8)
internal/backend/xattr_unix.go (+30 -0)
internal/backend/xattr_windows.go (+32 -0)

📄 Description

The latter remains a JSON-encoded blob but is now stored in file
extended attributes, except on Windows where it is a separate file.
This reduces memory usage and is much faster by avoiding JSON-encoding
large objects. This enables a future commit to avoid reading the
entire object, particularly for range requests. Note that this commit
changes the on-disk format and is not compatible with previous data
sets. Extended attributes have some caveats including lack of tmpfs
and Windows support. References pkg/xattr#47. References #669.
Fixes #671.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/683 **Author:** [@gaul](https://github.com/gaul) **Created:** 2/12/2022 **Status:** ✅ Merged **Merged:** 2/15/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `fs/xattr` --- ### 📝 Commits (1) - [`0e3aff1`](https://github.com/fsouza/fake-gcs-server/commit/0e3aff1a8e0e2c7da4a6acbd257ccca4f0359a0a) Store object data natively and metadata in xattr ### 📊 Changes **7 files changed** (+119 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/bucket_test.go` (+10 -1) 📝 `go.mod` (+1 -0) 📝 `go.sum` (+3 -0) 📝 `internal/backend/backend_test.go` (+10 -1) 📝 `internal/backend/fs.go` (+33 -8) ➕ `internal/backend/xattr_unix.go` (+30 -0) ➕ `internal/backend/xattr_windows.go` (+32 -0) </details> ### 📄 Description The latter remains a JSON-encoded blob but is now stored in file extended attributes, except on Windows where it is a separate file. This reduces memory usage and is much faster by avoiding JSON-encoding large objects. This enables a future commit to avoid reading the entire object, particularly for range requests. Note that this commit changes the on-disk format and is not compatible with previous data sets. Extended attributes have some caveats including lack of tmpfs and Windows support. References pkg/xattr#47. References #669. Fixes #671. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:31:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#823
No description provided.