Skip to content
Snippets Groups Projects
Commit e3f665e4 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

fix: globally distributed spaces are local

parent 11d8a371
No related branches found
No related tags found
1 merge request!538Feat/dml global
......@@ -59,6 +59,11 @@ impl SpaceDef {
})
.collect();
let mut flags = BTreeMap::new();
if matches!(self.distribution, Distribution::Global) {
flags.insert("group_id".into(), 1.into());
}
let space_def = SpaceMetadata {
id: self.id,
// Do we want to be more explicit about user_id?
......@@ -66,7 +71,7 @@ impl SpaceDef {
name: self.name.as_str().into(),
engine: SpaceEngineType::Memtx,
field_count: 0,
flags: Default::default(),
flags,
format,
};
......
......@@ -142,7 +142,7 @@ def test_ddl_create_space_bulky(cluster: Cluster):
"stuff",
"memtx",
0,
dict(),
dict(group_id=1),
[dict(name="id", type="unsigned", is_nullable=False)],
]
assert i1.call("box.space._space:get", space_id) == tt_space_def
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment