private BSONObject updateDocuments(final Channel channel, final String collectionName, final BSONObject selector,
final BSONObject update, final boolean multi, final boolean upsert) throws MongoServerException {
clearLastStatus(channel);
try {
if (collectionName.startsWith("system.")) {
throw new MongoServerError(10156, "cannot update system collection");
}
MongoCollection collection = resolveOrCreateCollection(collectionName);
return collection.updateDocuments(selector, update, multi, upsert);
} catch (MongoServerException e) {