Enforce the kMaxDocumentId limit.

If we exceed ~1 million documents, Icing lib will properly throw an
OUT_OF_SPACE error now. Previously, undefined behavior would have
occurred as our DocumentId could not properly store values greater than
2^20.

Bug: 192464981
Test: framework presubmit
Test: manually copied change to google3 and ran all icing lib c++ tests
Test: manually copied change to google3 and verified
BM_PutMaxAllowedDocuments succeeded

Change-Id: I1c4871c066bfcf2a4c1e8c51a9115fe64dbf5c88
4 files changed
tree: 5498f3656d62a2eece26be662ed0e2b8eb7eca0b
  1. icing/
  2. java/
  3. nativeLib/
  4. proto/
  5. .gitignore
  6. Android.bp
  7. AndroidManifest.xml
  8. build.gradle
  9. CMakeLists.txt
  10. CONTRIBUTING.md
  11. LICENSE
  12. METADATA
  13. MODULE_LICENSE_APACHE2
  14. README.md
  15. synced_AOSP_CL_number.txt
  16. TEST_MAPPING
README.md

Icing Search Library

Icing is a fast, embedded, mobile-friendly full-text-search library written in C++.

This is not an officially supported Google product.