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