Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 287de01

Browse files
committedAug 15, 2019
database: increase size limit of packages to 1.2 MB
By now, there are some large packages whose documentation exceeds the current size limit of 800 KB. Increase the limit by 1.5x to accomodate such packages. Fixes #635 Change-Id: Ie846366d2aea6a58f3cca3080c99fc0124995e5d Reviewed-on: https://go-review.googlesource.com/c/gddo/+/190398 Reviewed-by: Tuo Shan <shantuo@google.com>
1 parent 38fe216 commit 287de01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎database/database.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (db *Database) Put(ctx context.Context, pdoc *doc.Package, nextCrawl time.T
261261
gobBytes := snappy.Encode(nil, gobBuf.Bytes())
262262

263263
// Truncate large documents.
264-
if len(gobBytes) > 800000 {
264+
if len(gobBytes) > 1200000 {
265265
pdocNew := *pdoc
266266
pdoc = &pdocNew
267267
pdoc.Truncated = true

0 commit comments

Comments
 (0)