我正在使用 Couchbase-Java SDK 2.7.1 并尝试对一组文档键执行批量 subdoc 操作。下面的代码没有抛出任何错误,但在执行给定代码后文档没有得到更新。
/*
Document structure:
{
"key1": "",
"key2:: ""
}
*/
List<String> docIds = new ArrayList<String>();
docIds.add("mydoc-1");
docIds.add("mydoc-2");
String docPath = "key1";
String value = "myVal";
Observable<String> docIdsObs = Observable.from(docIds);
Observable<DocumentFragment<Mutation>>
subdocAppendObs =
docIdsObs.flatMap(docId -> this.subdocUpsert(bucket, docId, docPath, value,
persist, replicate, timeout,
timeunit));