Chris Lu
796a911cb3
Prevent bucket renaming in filer, fuse mount, and S3 ( #8048 )
...
* prevent bucket renaming in filer, fuse mount, s3
* refactor CanRename to support context propagation
* harden bucket rename validation to fail closed on find error
2026-01-16 19:48:09 -08:00
Chris Lu
288ba5fec8
mount: let filer handle chunk deletion decision ( #7900 )
...
* mount: let filer handle chunk deletion decision
Remove chunk deletion decision from FUSE mount's Unlink operation.
Previously, the mount decided whether to delete chunks based on
its locally cached entry's HardLinkCounter, which could be stale.
Now always pass isDeleteData=true and let the filer make the
authoritative decision based on its own data. This prevents
potential inconsistencies when:
- The FUSE mount's cached entry is stale
- Race conditions occur between multiple mounts
- Direct filer operations change hard link counts
* filer: check hard link counter before deleting chunks
When deleting an entry, only delete the underlying chunks if:
1. It is not a hard link
2. OR it is the last hard link (counter <= 1)
This protects against data loss when a client (like FUSE mount)
requests chunk deletion for a file that has multiple hard links.
2025-12-28 23:22:13 -08:00
Chris Lu
69553e5ba6
convert error fromating to %w everywhere ( #6995 )
2025-07-16 23:39:27 -07:00
Aleksey Kosov
4511c2cc1f
Changes logging function ( #6919 )
...
* updated logging methods for stores
* updated logging methods for stores
* updated logging methods for filer
* updated logging methods for uploader and http_util
* updated logging methods for weed server
---------
Co-authored-by: akosov <a.kosov@kryptonite.ru >
2025-06-24 08:44:06 -07:00
Aleksey Kosov
283d9e0079
Add context with request ( #6824 )
2025-05-28 11:34:02 -07:00
chrislu
4fee496b49
conditional delete
2024-08-01 13:00:54 -07:00
chrislu
a8fa78b892
refactoring
2024-07-17 23:14:36 -07:00
chrislu
4e7d8eb3f1
small refactoring
2024-07-11 14:50:11 -07:00
chrislu
464611f614
optionally skip deleting file chunks
2024-06-15 11:39:48 -07:00
Nikita Borzykh
0d04264494
Move file deletion logging to v2 verbisity ( #5538 )
2024-04-26 06:41:06 -07:00
wusong
d6af3a8eb6
fix 404 not found ( #4536 )
...
Signed-off-by: wang wusong <wangwusong@virtaitech.com >
Co-authored-by: wang wusong <wangwusong@virtaitech.com >
2023-06-06 09:14:49 -07:00
chrislu
70a4c98b00
refactor filer_pb.Entry and filer.Entry to use GetChunks()
...
for later locking on reading chunks
2022-11-15 06:33:36 -08:00
chrislu
303bd067b5
Revert "rename: delete source entry metadata only, skipping hard links"
...
This reverts commit 03466f955e .
fix https://github.com/seaweedfs/seaweedfs/issues/3386
2022-07-31 22:51:41 -07:00
chrislu
26dbc6c905
move to https://github.com/seaweedfs/seaweedfs
2022-07-29 00:17:28 -07:00
chrislu
4fd5f96598
filer: remove replication, collection, disk_type info from entry metadata
...
these metadata can change and are not used
2022-06-06 00:39:35 -07:00
elee
423ce57cde
prefix search, bucket implemented
2022-03-17 21:12:25 -05:00
chrislu
03466f955e
rename: delete source entry metadata only, skipping hard links
2022-02-25 02:57:54 -08:00
chrislu
be3fc77391
mount2: use consistent inode
2022-02-25 00:53:27 -08:00
chrislu
9f9ef1340c
use streaming mode for long poll grpc calls
...
streaming mode would create separate grpc connections for each call.
this is to ensure the long poll connections are properly closed.
2021-12-26 00:15:03 -08:00
Chris Lu
0c8dea9de8
go fmt
2021-11-02 23:39:16 -07:00
Chris Lu
1b90d60765
filer: paginate large directories to delete file chunks
2021-11-02 01:04:50 -07:00
Chris Lu
f5824f369c
avoid reporting error when it is a user request error
2021-10-29 14:14:29 -07:00
Chris Lu
182288f860
filer: fix mysql, postgres batch delete error
2021-07-22 08:23:20 -07:00
Konstantin Lebedev
6aa1a56ec8
avoid crashes Galera Cluster
...
https://github.com/chrislusf/seaweedfs/issues/2125
2021-06-15 18:12:39 +05:00
Chris Lu
9357911a95
remove all bucket metadata
...
fix https://github.com/chrislusf/seaweedfs/issues/2118
2021-06-10 23:37:54 -07:00
Chris Lu
ddc8643ee0
filer: directory listing adds namePatternExclude
...
fix https://github.com/chrislusf/seaweedfs/issues/2023
2021-04-24 11:49:03 -07:00
Konstantin Lebedev
15b018da34
s3 delete-objects pass OK for fail to delete non-empty folder
2021-03-10 19:41:35 +05:00
Chris Lu
f002e668de
change limit to int64 in case of overflow
2021-01-14 23:10:37 -08:00
Chris Lu
f17aa1d06c
skip directory loop if dropping the bucket
2021-01-13 13:49:04 -08:00
Chris Lu
2c3c2c27d7
separate prefix from namePattern
...
fix https://github.com/chrislusf/seaweedfs/issues/1722
2021-01-01 20:23:23 -08:00
Chris Lu
03637d6f57
s3: move "delete-directory-if-empty" to read time
...
move "delete-directory-if-empty" to read time instead of entry deletion time
the listing speed for a s3 bucket folder will slow down if it has many sub folders
related to 0d345ac97d
fix https://github.com/chrislusf/seaweedfs/issues/1647
fix https://github.com/chrislusf/seaweedfs/issues/1670
2020-12-12 03:38:34 -08:00
Chris Lu
0d345ac97d
s3: remove empty parent folder on delete
...
fix https://github.com/chrislusf/seaweedfs/issues/1637
2020-11-26 12:21:58 -08:00
Chris Lu
cc2bd97ad9
refactor
2020-11-26 11:25:56 -08:00
Chris Lu
513bcd6e0d
filer: avoid duplicated FindEntry for deletion
2020-11-26 11:14:56 -08:00
Chris Lu
290b5e2cd0
directly delete file chunks
...
keeping current async deletions for now
2020-11-17 17:20:21 -08:00
Chris Lu
62d3d3aea0
go fmt
2020-10-07 23:30:54 -07:00
Chris Lu
1012df7bb5
switch hardlink id from int64 to bytes
2020-09-24 11:11:42 -07:00
Chris Lu
5e239afdfc
hardlink works now
2020-09-24 03:06:48 -07:00
Chris Lu
387ab6796f
filer: cross cluster synchronization
2020-09-09 11:21:23 -07:00
Chris Lu
eb7929a971
rename filer2 to filer
2020-09-01 00:21:19 -07:00