1
0
Fork 0

Fixed v8-collection properties cluster-variant. In some cases it did not contain correct information

This commit is contained in:
Michael Hackstein 2017-02-23 16:46:21 +01:00
parent 076198106d
commit b6943d233b
1 changed files with 5 additions and 6 deletions

View File

@ -1255,7 +1255,6 @@ static void JS_PropertiesVocbaseCol(
v8::FunctionCallbackInfo<v8::Value> const& args) {
TRI_V8_TRY_CATCH_BEGIN(isolate);
v8::HandleScope scope(isolate);
TRI_GET_GLOBALS();
arangodb::LogicalCollection* collection =
TRI_UnwrapClass<arangodb::LogicalCollection>(args.Holder(), WRP_VOCBASE_COL_TYPE);
@ -1322,18 +1321,18 @@ static void JS_PropertiesVocbaseCol(
}
}
auto c = ClusterInfo::instance()->getCollection(
databaseName, StringUtils::itoa(collection->cid()));
VPackBuilder vpackProperties;
vpackProperties.openObject();
collection->toVelocyPackForV8(vpackProperties);
c->toVelocyPackForV8(vpackProperties);
vpackProperties.close();
// return the current parameter set
v8::Handle<v8::Object> result =
TRI_VPackToV8(isolate, vpackProperties.slice())->ToObject();
/*
auto c = ClusterInfo::instance()->getCollection(
databaseName, StringUtils::itoa(collection->cid()));
*/
TRI_V8_RETURN(result);
}