Skip to content

Commit e01838f

Browse files
apkardongxinEric
authored andcommitted
Resolves #92: Fail on unsupported collection options. (#126)
1 parent 9efd4d5 commit e01838f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/ExtCmd.actor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,11 @@ ACTOR static Future<Reference<ExtMsgReply>> doCreateCollection(Reference<ExtConn
828828
Reference<ExtMsgQuery> query,
829829
Reference<ExtMsgReply> reply) {
830830
try {
831+
if (query->query.getBoolField("capped") || query->query.hasField("storageEngine")) {
832+
TraceEvent(SevWarn, "CreateUnsupportedOption").detail("query", query->toString());
833+
throw unsupported_cmd_option();
834+
}
835+
831836
if (ec->explicitTransaction) {
832837
Void _ = wait(Internal_doCreateCollection(ec->tr, query, ec->mm));
833838
} else {

0 commit comments

Comments
 (0)