mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-02-09 09:17:28 +08:00
fix: Prevent potential metadata change events from being lost. (#6066)
This commit is contained in:
@@ -51,6 +51,8 @@ type S3ApiServer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer *S3ApiServer, err error) {
|
func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer *S3ApiServer, err error) {
|
||||||
|
startTsNs := time.Now().UnixNano()
|
||||||
|
|
||||||
v := util.GetViper()
|
v := util.GetViper()
|
||||||
signingKey := v.GetString("jwt.filer_signing.key")
|
signingKey := v.GetString("jwt.filer_signing.key")
|
||||||
v.SetDefault("jwt.filer_signing.expires_after_seconds", 10)
|
v.SetDefault("jwt.filer_signing.expires_after_seconds", 10)
|
||||||
@@ -101,7 +103,7 @@ func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer
|
|||||||
|
|
||||||
s3ApiServer.registerRouter(router)
|
s3ApiServer.registerRouter(router)
|
||||||
|
|
||||||
go s3ApiServer.subscribeMetaEvents("s3", time.Now().UnixNano(), filer.DirectoryEtcRoot, []string{option.BucketsPath})
|
go s3ApiServer.subscribeMetaEvents("s3", startTsNs, filer.DirectoryEtcRoot, []string{option.BucketsPath})
|
||||||
return s3ApiServer, nil
|
return s3ApiServer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user