mirror of https://gitee.com/bigwinds/arangodb
Added an Assert when persisting an index it's objectId is not allowed to be 0
This commit is contained in:
parent
b6bac742b1
commit
33d9e8af9d
|
@ -88,6 +88,8 @@ void RocksDBIndex::toVelocyPack(VPackBuilder& builder, bool withFigures,
|
||||||
bool forPersistence) const {
|
bool forPersistence) const {
|
||||||
Index::toVelocyPack(builder, withFigures, forPersistence);
|
Index::toVelocyPack(builder, withFigures, forPersistence);
|
||||||
if (forPersistence) {
|
if (forPersistence) {
|
||||||
|
// If we store it, it cannot be 0
|
||||||
|
TRI_ASSERT(_objectId != 0);
|
||||||
builder.add("objectId", VPackValue(std::to_string(_objectId)));
|
builder.add("objectId", VPackValue(std::to_string(_objectId)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue