1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-14 11:57:30 +00:00

Merge pull request #42 from DarkKirb/increase-nar-info-size-limit

Increase narinfo size limit to 1MiB
This commit is contained in:
Zhaofeng Li 2023-04-12 15:39:11 -06:00 committed by GitHub
commit d918f68c29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,9 @@ use crate::database::{AtticDatabase, ChunkGuard, NarGuard};
const CONCURRENT_CHUNK_UPLOADS: usize = 10; const CONCURRENT_CHUNK_UPLOADS: usize = 10;
/// The maximum size of the upload info JSON. /// The maximum size of the upload info JSON.
const MAX_NAR_INFO_SIZE: usize = 64 * 1024; // 64 KiB ///
/// TODO: Make this configurable
const MAX_NAR_INFO_SIZE: usize = 1 * 1024 * 1024; // 1 MiB
type CompressorFn<C> = Box<dyn FnOnce(C) -> Box<dyn AsyncRead + Unpin + Send> + Send>; type CompressorFn<C> = Box<dyn FnOnce(C) -> Box<dyn AsyncRead + Unpin + Send> + Send>;