From dbeabbb1ef8e593bbc16d6ab34904fbd67c99f22 Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Mon, 7 Aug 2017 15:11:01 +0200 Subject: [PATCH] deprecated inline object IDs, which cause significant slowdowns to the backup process, will be much more efficient with pack files --- cli/command_create.go | 2 +- cli/command_status.go | 1 + repo/initialize.go | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/command_create.go b/cli/command_create.go index c410a54cf..1be83cbdd 100644 --- a/cli/command_create.go +++ b/cli/command_create.go @@ -22,7 +22,7 @@ createAvgBlockSize = createCommand.Flag("avg-block-size", "Average size of a data block.").PlaceHolder("KB").Default("10240").Int() createMaxBlockSize = createCommand.Flag("max-block-size", "Maximum size of a data block.").PlaceHolder("KB").Default("20480").Int() - createInlineBlobSize = createCommand.Flag("inline-blob-size", "Maximum size of an inline data object.").PlaceHolder("KB").Default("32").Int() + createInlineBlobSize = createCommand.Flag("inline-blob-size", "Maximum size of an inline data object.").PlaceHolder("KB").Default("0").Int() createOverwrite = createCommand.Flag("overwrite", "Overwrite existing data (DANGEROUS).").Bool() createOnly = createCommand.Flag("create-only", "Create repository, but don't connect to it.").Short('c').Bool() ) diff --git a/cli/command_status.go b/cli/command_status.go index fde50f9f4..b03acdecc 100644 --- a/cli/command_status.go +++ b/cli/command_status.go @@ -55,6 +55,7 @@ func runStatusCommand(context *kingpin.ParseContext) error { fmt.Printf("Object manager: v%v\n", s.ObjectManagerVersion) fmt.Printf("Object format: %v\n", s.ObjectFormat) fmt.Printf("Splitter: %v%v\n", s.Splitter, splitterExtraInfo) + fmt.Printf("Inline content len: %v\n", s.MaxInlineContentLength) if s.MaxPackFileLength > 0 { fmt.Printf("Max pack file size: %v (max object %v)\n", units.BytesStringBase2(int64(s.MaxPackFileLength)), units.BytesStringBase2(int64(s.MaxPackedContentLength))) } diff --git a/repo/initialize.go b/repo/initialize.go index 04c7a0517..163690b27 100644 --- a/repo/initialize.go +++ b/repo/initialize.go @@ -94,12 +94,14 @@ func repositoryObjectFormatFromOptions(opt *NewRepositoryOptions) config.Reposit ObjectFormat: applyDefaultString(opt.ObjectFormat, DefaultObjectFormat), HMACSecret: applyDefaultRandomBytes(opt.ObjectHMACSecret, 32), MasterKey: applyDefaultRandomBytes(opt.ObjectEncryptionKey, 32), - MaxInlineContentLength: applyDefaultInt(opt.MaxInlineContentLength, 32<<10), // 32KiB MaxBlockSize: applyDefaultInt(opt.MaxBlockSize, 20<<20), // 20MiB MinBlockSize: applyDefaultInt(opt.MinBlockSize, 10<<20), // 10MiB AvgBlockSize: applyDefaultInt(opt.AvgBlockSize, 16<<20), // 16MiB MaxPackedContentLength: applyDefaultInt(opt.MaxPackedContentLength, 1<<20), // 1 MB MaxPackFileLength: applyDefaultInt(opt.MaxPackedContentLength, 20<<20), // 20 MB + + // deprecated, will be removed soon + MaxInlineContentLength: opt.MaxInlineContentLength, } if opt.noHMAC {