ArcticDB
ArcticDB copied to clipboard
You can create invalid library names with Mongo backend
Describe the bug
ArcticDB lets me create an unusable library with a /
on MongoDB backend. /
is not a valid char for a Mongo database name.
Steps/Code to Reproduce
import numpy as np
import arcticdb as adb
arctic = adb.Arctic('mongodb://localhost:27017')
a.create_library('a/b')
lib = a.get_library('a/b')
lib.write('c', np.array([1, 2, 3]))
Fails with
StorageException: E_UNEXPECTED_MONGO_ERROR Unexpected Mongo Error: MongoError#73: mongodb generic server error Invalid database name: 'arcticc_a/b': generic server error
Expected Results
create_library
should fail instead
OS, Python Version and ArcticDB Version
Python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0]
OS: Linux-5.15.0-101-generic-x86_64-with-glibc2.35
ArcticDB: 4.4.2
Backend storage used
Mongo
Additional Context
No response