-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sqlite] check blob size when serializing
Summary: SQLite has a compile-time-settable, maximum length for strings and blobs written to the database. We previously had a mechanism for recovering from exceptions thrown when this limit is exceeded, but SQLite (or the OCaml bindings) seem to get into a bad state and the recovery mechanism is not working properly and leads to crashes regardless. This diff adds a configurable maximum blob size that is checked during serialization (as opposed to during writing to the DB). Because the OCaml bindings do not let us retrieve what is the current compiled blob length, we put in place a user-configurable limit. Currently, we check that this size limit is not exceeded only when writing out summaries. If the limit is exceeded, we write an empty summary. If the size is exceeded elsewhere we will get a crash. Reviewed By: dulmarod Differential Revision: D50077381 Privacy Context Container: L1208441 fbshipit-source-id: 25544898ca1b46de39cb63ac6df0b4e5199f46f9
- Loading branch information
1 parent
12ca140
commit 1244be3
Showing
10 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters