Fix minimum replication workers started (#10560)

This PR also fixes GetReplicationConfiguration permission
in web-handlers.go to use bucket as resource
master
poornas 4 years ago committed by GitHub
parent ca989eb0b3
commit e6ab4db6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmd/bucket-replication.go
  2. 2
      cmd/web-handlers.go
  3. 2
      docs/bucket/replication/README.md

@ -304,6 +304,11 @@ var (
) )
func newReplicationState() *replicationState { func newReplicationState() *replicationState {
// fix minimum concurrent replication to 1 for single CPU setup
if globalReplicationConcurrent == 0 {
globalReplicationConcurrent = 1
}
rs := &replicationState{ rs := &replicationState{
replicaCh: make(chan ObjectInfo, globalReplicationConcurrent*2), replicaCh: make(chan ObjectInfo, globalReplicationConcurrent*2),
} }

@ -1025,7 +1025,7 @@ func (web *webAPIHandlers) Upload(w http.ResponseWriter, r *http.Request) {
BucketName: bucket, BucketName: bucket,
ConditionValues: getConditionValues(r, "", claims.AccessKey, claims.Map()), ConditionValues: getConditionValues(r, "", claims.AccessKey, claims.Map()),
IsOwner: owner, IsOwner: owner,
ObjectName: object, ObjectName: "",
Claims: claims.Map(), Claims: claims.Map(),
}) { }) {
replPerms = ErrNone replPerms = ErrNone

@ -129,6 +129,8 @@ Replication status can be seen in the metadata on the source and destination obj
To perform bi-directional replication, repeat the above process on the target site - this time setting the source bucket as the replication target. To perform bi-directional replication, repeat the above process on the target site - this time setting the source bucket as the replication target.
It is recommended that replication be run in a system with atleast two CPU's available to the process, so that replication can run in its own thread.
![put](https://raw.githubusercontent.com/minio/minio/master/docs/bucket/replication/PUT_bucket_replication.png) ![put](https://raw.githubusercontent.com/minio/minio/master/docs/bucket/replication/PUT_bucket_replication.png)
![head](https://raw.githubusercontent.com/minio/minio/master/docs/bucket/replication/HEAD_bucket_replication.png) ![head](https://raw.githubusercontent.com/minio/minio/master/docs/bucket/replication/HEAD_bucket_replication.png)

Loading…
Cancel
Save