@@ -46,7 +46,7 @@ type RunState struct {
46
46
47
47
keyCache [128 ]ds.Key
48
48
cachedKeys int32
49
- ctr int32
49
+ ctr int32 //nolint:unused
50
50
}
51
51
52
52
// DB returns the datastore being driven by this instance
@@ -192,7 +192,7 @@ const (
192
192
opMax
193
193
)
194
194
195
- func threadDriver (ctx context.Context , runState * RunState , cmnds chan byte ) error {
195
+ func threadDriver (ctx context.Context , runState * RunState , cmnds chan byte ) {
196
196
defer runState .wg .Done ()
197
197
s := threadState {}
198
198
s .RunState = runState
@@ -203,11 +203,11 @@ func threadDriver(ctx context.Context, runState *RunState, cmnds chan byte) erro
203
203
select {
204
204
case c , ok := <- cmnds :
205
205
if ! ok {
206
- return nil
206
+ return
207
207
}
208
208
_ = nextState (& s , c )
209
209
case <- ctx .Done ():
210
- return nil
210
+ return
211
211
}
212
212
}
213
213
}
@@ -220,21 +220,21 @@ func nextState(s *threadState, c byte) error {
220
220
if ! s .keyReady {
221
221
return makeKey (s , c )
222
222
}
223
- s .reader .Get (s .key )
223
+ _ , _ = s .reader .Get (s .key )
224
224
reset (s )
225
225
return nil
226
226
} else if s .op == opHas {
227
227
if ! s .keyReady {
228
228
return makeKey (s , c )
229
229
}
230
- s .reader .Has (s .key )
230
+ _ , _ = s .reader .Has (s .key )
231
231
reset (s )
232
232
return nil
233
233
} else if s .op == opGetSize {
234
234
if ! s .keyReady {
235
235
return makeKey (s , c )
236
236
}
237
- s .reader .GetSize (s .key )
237
+ _ , _ = s .reader .GetSize (s .key )
238
238
reset (s )
239
239
return nil
240
240
} else if s .op == opQuery {
@@ -255,14 +255,14 @@ func nextState(s *threadState, c byte) error {
255
255
if ! s .valReady {
256
256
return makeValue (s , c )
257
257
}
258
- s .writer .Put (s .key , s .val )
258
+ _ = s .writer .Put (s .key , s .val )
259
259
reset (s )
260
260
return nil
261
261
} else if s .op == opDelete {
262
262
if ! s .keyReady {
263
263
return makeKey (s , c )
264
264
}
265
- s .writer .Delete (s .key )
265
+ _ = s .writer .Delete (s .key )
266
266
reset (s )
267
267
return nil
268
268
} else if s .op == opNewTX {
@@ -297,7 +297,7 @@ func nextState(s *threadState, c byte) error {
297
297
if ! s .keyReady {
298
298
return makeKey (s , c )
299
299
}
300
- s .RunState .inst .Sync (s .key )
300
+ _ = s .RunState .inst .Sync (s .key )
301
301
reset (s )
302
302
return nil
303
303
}
0 commit comments