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

Commit

Permalink
database: increase size limit of packages to 1.2 MB
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dmitshur committed Aug 15, 2019
1 parent 38fe216 commit 287de01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (db *Database) Put(ctx context.Context, pdoc *doc.Package, nextCrawl time.T
gobBytes := snappy.Encode(nil, gobBuf.Bytes())

// Truncate large documents.
if len(gobBytes) > 800000 {
if len(gobBytes) > 1200000 {
pdocNew := *pdoc
pdoc = &pdocNew
pdoc.Truncated = true
Expand Down

0 comments on commit 287de01

Please sign in to comment.