Answer the question
In order to leave comments, you need to log in
Spontaneously deleting records from MongoDB shards?
I have MongoDB 3 installed.
Created within one server 4 shards, 1 config server.
Records are being added to the collection, approximately 100 records per second. There are about 100 million entries in the collection. There are no stresses. A random sharding key is selected, I add a random hash to each entry. It used to be 10 random characters, then 16. I
began to notice that after I complete the addition, after some time, records are deleted from the shards. They are deleted at approximately the same rate of 50-100 records per second. I thought it was because of the distribution that the records are being moved, but after running queries for the number of records in each shard, I came to the conclusion that about 100 thousand records are being deleted per night.
Help solve the problem.
Answer the question
In order to leave comments, you need to log in
db.myCollectioName.getShardDistribution();
I do not understand why a day later the reverse process begins. I tried to start adding minutes for 15, then complete and wait for the removal, but it does not happen. Everything seems to work normally.
In what direction to study?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question