diff options
| author | Guang Jiong Lou <7991675+27149chen@users.noreply.github.com> | 2025-01-01 10:41:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-31 18:41:43 -0800 |
| commit | 3b1ac77e1f34ec561191073db5ee859cef714c0f (patch) | |
| tree | b9b5b8b654e9211470f78716f0e7eb73e8289356 /weed/filer/entry.go | |
| parent | 0e8e6122d559ea4f055cbd7a1b17d00bfc79bed5 (diff) | |
| download | seaweedfs-3b1ac77e1f34ec561191073db5ee859cef714c0f.tar.xz seaweedfs-3b1ac77e1f34ec561191073db5ee859cef714c0f.zip | |
worm grace period and retention time support (#6404)
Signed-off-by: lou <alex1988@outlook.com>
Diffstat (limited to 'weed/filer/entry.go')
| -rw-r--r-- | weed/filer/entry.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/weed/filer/entry.go b/weed/filer/entry.go index 2062401f7..5bd1a3c56 100644 --- a/weed/filer/entry.go +++ b/weed/filer/entry.go @@ -38,11 +38,12 @@ type Entry struct { // the following is for files Chunks []*filer_pb.FileChunk `json:"chunks,omitempty"` - HardLinkId HardLinkId - HardLinkCounter int32 - Content []byte - Remote *filer_pb.RemoteEntry - Quota int64 + HardLinkId HardLinkId + HardLinkCounter int32 + Content []byte + Remote *filer_pb.RemoteEntry + Quota int64 + WORMEnforcedAtTsNs int64 } func (entry *Entry) Size() uint64 { @@ -98,6 +99,7 @@ func (entry *Entry) ToExistingProtoEntry(message *filer_pb.Entry) { message.Content = entry.Content message.RemoteEntry = entry.Remote message.Quota = entry.Quota + message.WormEnforcedAtTsNs = entry.WORMEnforcedAtTsNs } func FromPbEntryToExistingEntry(message *filer_pb.Entry, fsEntry *Entry) { @@ -110,6 +112,7 @@ func FromPbEntryToExistingEntry(message *filer_pb.Entry, fsEntry *Entry) { fsEntry.Remote = message.RemoteEntry fsEntry.Quota = message.Quota fsEntry.FileSize = FileSize(message) + fsEntry.WORMEnforcedAtTsNs = message.WormEnforcedAtTsNs } func (entry *Entry) ToProtoFullEntry() *filer_pb.FullEntry { |
