Fix sqlite storage for numconns 1
This commit is contained in:
parent
d48c6ae6dc
commit
15ccbc95c6
|
@ -265,9 +265,8 @@ func NewPool(opts NewPoolOpts) (_ ConnPool, _ ProviderOpts, err error) {
|
|||
}
|
||||
return conns, ProviderOpts{
|
||||
NumConns: opts.NumConns,
|
||||
NoConcurrentBlobReads: opts.NoConcurrentBlobReads || opts.Memory,
|
||||
BatchWrites: true,
|
||||
//BatchWrites: opts.NumConns > 1,
|
||||
NoConcurrentBlobReads: opts.NoConcurrentBlobReads || opts.Memory || opts.NumConns == 1,
|
||||
BatchWrites: opts.NumConns > 1,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ func TestClientTransferVarious(t *testing.T) {
|
|||
Wrapper: fileCachePieceResourceStorage,
|
||||
}), 0},
|
||||
{"Boltdb", storage.NewBoltDB, 0},
|
||||
//sqliteLeecherStorageTestCase(1),
|
||||
sqliteLeecherStorageTestCase(1),
|
||||
sqliteLeecherStorageTestCase(2),
|
||||
// This should use a number of connections equal to the number of CPUs
|
||||
sqliteLeecherStorageTestCase(0),
|
||||
|
|
Loading…
Reference in New Issue