Chris Lu
84b8a8e010
filer.sync: fix checkpoint not being saved properly ( #7719 )
* filer.sync: fix race condition on first checkpoint save
Initialize lastWriteTime to time.Now() instead of zero time to prevent
the first checkpoint save from being triggered immediately when the
first event arrives. This gives async jobs time to complete and update
the watermark before the checkpoint is saved.
Previously, the zero time caused lastWriteTime.Add(3s).Before(now) to
be true on the first event, triggering an immediate checkpoint save
attempt. But since jobs are processed asynchronously, the watermark
was still 0 (initial value), causing the save to be skipped due to
the 'if offsetTsNs == 0 { return nil }' check.
Fixes #7717
* filer.sync: save checkpoint on graceful shutdown
Add graceful shutdown handling to save the final checkpoint when
filer.sync is terminated. Previously, any sync progress within the
last 3-second checkpoint interval would be lost on shutdown.
Changes:
- Add syncState struct to track current processor and offset save info
- Add atomic pointers syncStateA2B and syncStateB2A for both directions
- Register grace.OnInterrupt hook to save checkpoints on shutdown
- Modify doSubscribeFilerMetaChanges to update sync state atomically
This ensures that when filer.sync is restarted, it resumes from the
correct position instead of potentially replaying old events.
Fixes #7717
6 days ago
Numblgw
aebf3952b7
filer sync: source path and exclude path support dir suffix ( #6268 )
filer sync: source path and exclude paht support dir suffix
Co-authored-by: liguowei <liguowei@xinye.com>
1 year ago
Max Denushev
a5fe6e21bc
feat(filer.backup): add ignore errors option ( #6235 )
* feat(filer.backup): add ignore errors option
* feat(filer.backup): fix 404 error wrap
* feat(filer.backup): fix wrapping function
* feat(filer.backup): fix wrapping errors in genProcessFunction
* Update weed/command/filer_backup.go
* Update weed/command/filer_backup.go
* Update weed/command/filer_backup.go
---------
Co-authored-by: Max Denushev <denushev@tochka.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
1 year ago
chrislu
19d14b4c71
minor
1 year ago
vadimartynov
b796c21fa9
Added loadSecurityConfigOnce ( #5792 )
1 year ago
chrislu
3a82f5ffad
ensure metadata follow a specific folder
fix https://github.com/seaweedfs/seaweedfs/issues/5774
1 year ago
Konstantin Lebedev
d821cb3b18
fix: sync without dir /buckets/some/.uploads/hash_hash ( #5402 )
2 years ago
chrislu
83e4b02517
fix
2 years ago
chrislu
15b66a6633
refactor
2 years ago
XIAOYQ
be166b434f
fix: skip s3 .uploads
2 years ago
Konstantin Lebedev
8d23e36c45
fix: doDeleteFiles deletes files ( #5198 )
2 years ago
Konstantin Lebedev
1169f94310
Fix filer sync set offset ( #5197 )
* fix: compose 2mount with sync
* fix: DATA RACE
https://github.com/seaweedfs/seaweedfs/issues/5194
https://github.com/seaweedfs/seaweedfs/issues/5195
2 years ago
Konstantin Lebedev
b9d32d32e1
chore: filer sync add doDeleteFiles option for create only mode ( #5166 )
2 years ago
Konstantin Lebedev
2b229e98ce
fix: add doDeleteFile option for filer backup
2 years ago
Konstantin Lebedev
3c5295a1a6
filer backup add option for exclude file names that match the regexp to sync on filer
2 years ago
chrislu
5db9fcccd4
refactoring
3 years ago
chrislu
81fdf3651b
grpc connection to filer add sw-client-id header
3 years ago
chrislu
8a40fa8993
more detailed logs
3 years ago
Jiffs Maverick
4b0430e71d
[metrics] Add the ability to control bind ip ( #4012 )
3 years ago
chrislu
21c0587900
go fmt
3 years ago
Ryan Russell
2c92a9ff74
refactor: `DefaultConcurrencyLimit` var rename ( #3658 )
3 years ago
bernardx
228b133afa
new 'concurrency' parameter for filer.sync ( #3579 )
Co-authored-by: XIAOYQ <xiaoyq@eudic.net>
3 years ago
qzh
7fcfaf7bc9
fix(filer.sync): offset may be set to 0 ( #3451 )
* fix(filer.sync): initializing the offset is related to the path
* fix(filer.sync): the offset maybe to be set to 0.
Co-authored-by: zhihao.qu <zhihao.qu@ly.com>
3 years ago
qzh
400f0c3e5d
fix(filer.sync): initializing the offset is related to the path ( #3450 )
Co-authored-by: zhihao.qu <zhihao.qu@ly.com>
3 years ago
chrislu
67814a5c79
refactor and fix strings.Split
3 years ago
chrislu
1a4bf0dcb5
filer.sync: parallelize the filer.sync
3 years ago
chrislu
0e9478488d
filer.sync: fix when excluded paths is empty
3 years ago
chrislu
26dbc6c905
move to https://github.com/seaweedfs/seaweedfs
3 years ago
Konstantin Lebedev
7e09a548a6
exclude directories to sync on filer
3 years ago
chrislu
64f3d6fb6e
metadata subscription uses client epoch
3 years ago
chrislu
4a65159250
fix reading time
4 years ago
zhihao.qu
4d0d1848c6
fix(filer.sync): modify clientName format : from -> to
4 years ago
zhihao.qu
42d04c581b
feat(filer.sync): add metricsServer in filer.sync.
Metrics include:
(1) the offset of the filer.sync
(2) the last send timestamp of the filer subscription
4 years ago
zhihao.qu
14d82c3dea
feat(filer.sync): add offset to path.
4 years ago
zhihao.qu
cd5cca36a4
feat(filer.sync): add fromTsMs. Extract signature from doSubscribeFilerMetaChanges
4 years ago
creeew
02ae102731
fix filer.sync missing source srv uploaded files to target when target down
4 years ago
chrislu
a2b101a737
subscribe metadata between a range
4 years ago
chrislu
1384529eb7
Fix filer.backup deletes files in backup folder in incremental mode
fix https://github.com/chrislusf/seaweedfs/issues/2919
4 years ago
chrislu
202a29d014
refactoring
4 years ago
chrislu
6a12520a96
fix logging
4 years ago
chrislu
5c87fcc6d2
add client id for all metadata listening clients
4 years ago
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.
4 years ago
Chris Lu
e5fc35ed0c
change server address from string to a type
4 years ago
Chris Lu
8e125339d5
line wrap
4 years ago
Chris Lu
68ea99190f
add additionalPathPrefixes
4 years ago
Chris Lu
c5f38c365d
go fmt
4 years ago
Chris Lu
df85f7a1eb
adjust help message
4 years ago
Chris Lu
6b743dbbf9
refactor client subscribe metadata
4 years ago
Chris Lu
3afbf04007
add TLS grpc support for filer meta clients
4 years ago
Chris Lu
c2e0a75c1f
adjust logs
5 years ago