mononoke: fix integration test regression by reducing number of sqlite shards

Summary:
Even simplest test took ~30 seconds to finish. Turned out most of the time is
sepnt in creating sqlite shards, and the reason we haven't noticed it before is
because we haven't use sqlblob in integration tests until recently (until
February 24 to be precise - D20001261).

We don't need 100 sqlite shards, let's decrease it downto 5.

Reviewed By: HarveyHunt

Differential Revision: D20438107

fbshipit-source-id: e71fd4cabf908e3d92b446fc518a0e5dd64a00bb
This commit is contained in:
Stanislau Hlebik 2020-03-13 06:24:45 -07:00 committed by Facebook GitHub Bot
parent 98860e0615
commit c96d794502

View File

@ -40,7 +40,7 @@ const MAX_KEY_SIZE: usize = 200;
// In order to store blobs that can be stored in Memcache as well use the same max size as memcache
// does, but leave some extra bytes for metadata
const CHUNK_SIZE: usize = MEMCACHE_VALUE_MAX_SIZE - 1000;
const SQLITE_SHARD_NUM: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(100) };
const SQLITE_SHARD_NUM: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(2) };
const COUNTED_ID: &str = "sqlblob";
pub type CountedSqlblob<C> = CountedBlobstore<Sqlblob<C>>;