aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_sync.go
AgeCommit message (Collapse)AuthorFilesLines
2025-12-11filer.sync: fix checkpoint not being saved properly (#7719)Chris Lu1-3/+49
* 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
2024-11-21filer sync: source path and exclude path support dir suffix (#6268)Numblgw1-8/+13
filer sync: source path and exclude paht support dir suffix Co-authored-by: liguowei <liguowei@xinye.com>
2024-11-14feat(filer.backup): add ignore errors option (#6235)Max Denushev1-4/+4
* 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>
2024-07-16minorchrislu1-3/+3
2024-07-16Added loadSecurityConfigOnce (#5792)vadimartynov1-1/+1
2024-07-12ensure metadata follow a specific folderchrislu1-1/+6
fix https://github.com/seaweedfs/seaweedfs/issues/5774
2024-03-20fix: sync without dir /buckets/some/.uploads/hash_hash (#5402)Konstantin Lebedev1-1/+1
2024-01-18fixchrislu1-1/+0
2024-01-18refactorchrislu1-1/+3
2024-01-18fix: skip s3 .uploadsXIAOYQ1-1/+4
2024-01-12fix: doDeleteFiles deletes files (#5198)Konstantin Lebedev1-1/+1
2024-01-12Fix filer sync set offset (#5197)Konstantin Lebedev1-10/+12
* fix: compose 2mount with sync * fix: DATA RACE https://github.com/seaweedfs/seaweedfs/issues/5194 https://github.com/seaweedfs/seaweedfs/issues/5195
2024-01-06chore: filer sync add doDeleteFiles option for create only mode (#5166)Konstantin Lebedev1-2/+8
2023-11-17fix: add doDeleteFile option for filer backupKonstantin Lebedev1-8/+11
2023-11-13filer backup add option for exclude file names that match the regexp to sync ↵Konstantin Lebedev1-2/+6
on filer
2023-03-21refactoringchrislu1-2/+14
2023-01-20grpc connection to filer add sw-client-id headerchrislu1-2/+2
2022-12-17more detailed logschrislu1-3/+15
2022-11-24[metrics] Add the ability to control bind ip (#4012)Jiffs Maverick1-1/+3
2022-09-14go fmtchrislu1-1/+1
2022-09-14refactor: `DefaultConcurrencyLimit` var rename (#3658)Ryan Russell1-4/+4
2022-09-02new 'concurrency' parameter for filer.sync (#3579)bernardx1-6/+16
Co-authored-by: XIAOYQ <xiaoyq@eudic.net>
2022-08-15fix(filer.sync): offset may be set to 0 (#3451)qzh1-0/+3
* 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>
2022-08-15fix(filer.sync): initializing the offset is related to the path (#3450)qzh1-4/+4
Co-authored-by: zhihao.qu <zhihao.qu@ly.com>
2022-08-07refactor and fix strings.Splitchrislu1-2/+2
2022-08-07filer.sync: parallelize the filer.syncchrislu1-4/+9
2022-08-07filer.sync: fix when excluded paths is emptychrislu1-2/+2
2022-07-29move to https://github.com/seaweedfs/seaweedfschrislu1-11/+11
2022-07-27exclude directories to sync on filerKonstantin Lebedev1-10/+48
2022-07-23metadata subscription uses client epochchrislu1-4/+7
2022-06-27fix reading timechrislu1-2/+2
2022-06-15fix(filer.sync): modify clientName format : from -> tozhihao.qu1-1/+1
2022-06-15feat(filer.sync): add metricsServer in filer.sync.zhihao.qu1-1/+10
Metrics include: (1) the offset of the filer.sync (2) the last send timestamp of the filer subscription
2022-06-14feat(filer.sync): add offset to path.zhihao.qu1-2/+12
2022-06-09feat(filer.sync): add fromTsMs. Extract signature from ↵zhihao.qu1-13/+53
doSubscribeFilerMetaChanges
2022-06-02fix filer.sync missing source srv uploaded files to target when target downcreeew1-1/+1
2022-05-30subscribe metadata between a rangechrislu1-1/+1
2022-04-14Fix filer.backup deletes files in backup folder in incremental modechrislu1-1/+4
fix https://github.com/chrislusf/seaweedfs/issues/2919
2022-02-25refactoringchrislu1-3/+3
2022-01-10fix loggingchrislu1-1/+4
2021-12-30add client id for all metadata listening clientschrislu1-4/+6
2021-12-26use streaming mode for long poll grpc callschrislu1-2/+2
streaming mode would create separate grpc connections for each call. this is to ensure the long poll connections are properly closed.
2021-09-12change server address from string to a typeChris Lu1-8/+10
2021-08-31line wrapChris Lu1-1/+2
2021-08-31add additionalPathPrefixesChris Lu1-2/+1
2021-08-08go fmtChris Lu1-2/+2
2021-08-08adjust help messageChris Lu1-2/+2
2021-08-04refactor client subscribe metadataChris Lu1-43/+6
2021-08-03add TLS grpc support for filer meta clientsChris Lu1-0/+1
2021-06-24adjust logsChris Lu1-1/+1