@@ -47,11 +47,11 @@ func main() {
4747 ctx , cancel := context .WithCancel (context .Background ())
4848
4949 logger .Get ().Info ("creating payload" )
50- payload := []byte ("1123123456789123456712312345678912123123456789123456712312345678912345671231234567891234567123123456789123456734567123123456789123456712312345678912345672312345678912345671231234567891212312345678912345671231234567891234567123123456789123456712312345678912345673456712312345678912345671231234567891234567 " )
50+ payload := []byte ("11123123456789123456712312345678912123123456789123456712312345678912345671231234567891234567123123456789123456734567123123456789123456712312345678912345672312345678912345671231234567891212312345678912345671231234567891234567123123456789123456712312345678912345673456712312345678912345671231234567891234567123123456789123456712312345678912123123456789123456712312345678912345671231234567891234567123123456789123456734567123123456789123456712312345678912345672312345678912345671231234567891212312345678912345671231234567891234567123123456789123456712312345678912345673456712312345678912345671231234567891234567 " )
5151 payloadSize := len (payload )
5252 data := make (map [string ][]byte )
5353 cols := []string {}
54- for i := 0 ; i < 50 ; i ++ {
54+ for i := 0 ; i < 300 ; i ++ {
5555 data [fmt .Sprintf ("%d" , i )] = payload
5656 cols = append (cols , fmt .Sprintf ("%d" , i ))
5757 }
@@ -69,7 +69,6 @@ func main() {
6969 for i , writer := range writers {
7070 wg .Add (1 )
7171 go writer .Start (ctx , & wg , data , cols , * writeDelay , int64 (* start ), i , numOfWriters )
72- time .Sleep (0 * time .Millisecond )
7372 }
7473
7574 logger .Get ().Info ("service running, waiting for shutdown signal" )
@@ -106,7 +105,7 @@ func NewWriter() (*Writer, error) {
106105 rueidis.ClientOption {
107106 InitAddress : []string {"kvrocks-byron-test.us-east-1.stackadapt:6379" },
108107 ShuffleInit : true ,
109- ConnWriteTimeout : time .Millisecond * 100 ,
108+ ConnWriteTimeout : time .Millisecond * 2500 ,
110109 DisableCache : true , // client cache is not enabled on kvrocks
111110 PipelineMultiplex : 5 ,
112111 MaxFlushDelay : 50 * time .Microsecond ,
@@ -158,7 +157,7 @@ func (w *Writer) Start(ctx context.Context, wg *sync.WaitGroup, data map[string]
158157
159158 // Convert integer keyIndex to alphabet-only key before passing to hSetExpire
160159 alphabetKey := intToAlphabetKey (keyIndex )
161- err := hSetExpire (ctx , time .Second * 1 , w .client , alphabetKey , cols , data , time .Hour * 24 * 7 )
160+ err := hSetExpire (ctx , time .Millisecond * 2000 , w .client , alphabetKey , cols , data , time .Hour * 24 * 7 )
162161 if err != nil {
163162 // Check if error is due to context cancellation
164163 if ctx .Err () != nil {
0 commit comments