rpc: Remove time check for each RPC calls. (#3804)

This removal comes to avoid some redundant requirements
which are adding more problems on a production setup.

Here are the list of checks for time as they happen

 - Fresh connect (during server startup) - CORRECT
 - A reconnect after network disconnect - CORRECT
 - For each RPC call - INCORRECT.

Verifying time for each RPC aggravates a situation
where a RPC call is rejected in a sequence of events
due to enough load on a production setup. 3 second
might not be enough time window for the call to be
initiated and received by the server.
This commit is contained in:
Harshavardhana
2017-02-24 18:26:56 -08:00
committed by GitHub
parent cff45db1b9
commit 70d2cb5f4d
6 changed files with 5 additions and 60 deletions
+1 -2
View File
@@ -20,7 +20,6 @@ import (
"encoding/json"
"path"
"testing"
"time"
)
type TestRPCS3PeerSuite struct {
@@ -62,7 +61,7 @@ func TestS3PeerRPC(t *testing.T) {
// Test S3 RPC handlers
func (s *TestRPCS3PeerSuite) testS3PeerRPC(t *testing.T) {
// Validate for invalid token.
args := AuthRPCArgs{AuthToken: "garbage", RequestTime: time.Now().UTC()}
args := AuthRPCArgs{AuthToken: "garbage"}
rclient := newRPCClient(s.testAuthConf.serverAddr, s.testAuthConf.serviceEndpoint, false)
defer rclient.Close()
err := rclient.Call("S3.SetBucketNotificationPeer", &args, &AuthRPCReply{})