Commit bc8ab077 authored by neelesh thakur's avatar neelesh thakur
Browse files

check cursor before hashing

parent bbc21b7b
......@@ -142,10 +142,11 @@ public class QueryRepository implements IQueryRepository {
continuation = ((CosmosStorePageRequest) pageable).getRequestContinuation();
}
String hashedCursor = Crc32c.hashToBase64EncodedString(continuation);
this.cursorCache.put(hashedCursor, continuation);
dqr.setCursor(hashedCursor);
if (!Strings.isNullOrEmpty(continuation)) {
String hashedCursor = Crc32c.hashToBase64EncodedString(continuation);
this.cursorCache.put(hashedCursor, continuation);
dqr.setCursor(hashedCursor);
}
docs = docPage.getContent();
} else {
docs = record.findByMetadata_kindAndMetadata_status(kind, status);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment