Index Tool: system.profile.metadata.json file breaks --show-issues option
JCass149 opened this issue · 5 comments
I'm not sure why, but running the --dump-indexes
option for the documentdb_index_tool.py
tool generates a system.profile.metadata.json
file. When I then run the --show-issues
option against the metadata directory generated I get the following error:
Failed to load collection metadata: 'indexes'
I found removing the system.profile.metadata.json
file from the output resolves this issue.
Python version: Python 3.9.13
MongoDB version: MongoDB 4.0.25 Community
Same here with Python 3.8.10 & Mongo 3.6.3. Thanks for making this issue so I could resolve the issue @JCass149.
I will review and resolve this soon.
@JCass149 and @martinblostein - can either of you reply here with more details? I'm wondering what database (and thus directory from --dump-indexes) the system.profile.metadata.json file is in.
I have the same issue.
@tmcallaghan.
As per https://aws.amazon.com/blogs/database/migrating-to-amazon-documentdb-with-the-online-method/, I ran:
python3 migrationtools/documentdb_index_tool.py --dump-indexes --dir ~/index.js/ ...
I have two databases within my mongo server.
It created two different system.indexes.metadata.json
in index.js
, one for each of the different database.
ie,
/home/ec2-user/index.js/mydatabase/system.indexes.metadata.json
/home/ec2-user/index.js/myotherdatabase/system.indexes.metadata.json
Both had exactly the same contents:
{"options":{},"indexes":[]}
Python 3.7.10
MongoDB shell version v4.0.28
Deleting these files worked for me.
@tmcallaghan, I saw the same thing as @agentgonzo, there was a system.indexes.metadata.json
file in each folder, corresponding to each database on my source server.