[SERVER-50665] Index creation stuck with "Index Build: draining writes received during build" Created: 01/Sep/20 Updated: 06/Sep/20 Resolved: 06/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 4.4.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Minor - P4 |
| Reporter: | Ivan Shcholokov | Assignee: | Dmitry Agranat |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | Indexing, indexes | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
CentOS Linux release 8.2.2004, db version v4.4.0 |
||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Good day, I have 4 rows in the test collection:
After running db.test.createIndex({test:1},{background:1}); to create an index, it just hangs. It was hanging for at least a few hours. Here is what I found in the db.currentOp() about this operation:
This Index Build: draining writes received during build makes no sense to me since there was no read/writes to the test collection during index creation. Also index creation hangs only in non-empty collection. Index creates successfully in empty collection. I'm running MongoDB server as a single-node replica set. I haven't found any mentions of this message in the google, so I assume it's not a bug, but an issue on my side. What might be an issue in this case? I'm out of ideas. PS: apologies if I selected wrong Project for this issue/question. |
| Comments |
| Comment by Dmitry Agranat [ 06/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Glad to hear this has resolved the reported issue bobgubko13@gmail.com, I will go ahead and close this case. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ivan Shcholokov [ 03/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You are totally right, adding keyfile helped and createIndex works now. Dima, thanks for your time and help! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dmitry Agranat [ 03/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the clarification bobgubko13@gmail.com, it is always helpful to understand where you see reported issue. This issue might be related to | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ivan Shcholokov [ 02/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It's weird, because DB logs were not cleared or altered after initial setup. What log file should contain info about this operation — mongod.log or metric data? Here is what I see when I run db.currentOp({msg:/drain/i}) (sorry for a long paste):
PS: Apologies for a not formatted paste, I cannot format it correctly — visual editor is acting weird. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dmitry Agranat [ 02/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi bobgubko13@gmail.com, I was not able to find any operation with the Index Build: draining writes received during build messages in the uploaded logs. Could you please check again and reattach the logs containing this message? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ivan Shcholokov [ 01/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Dmitry, Thanks for replying. Just uploaded two tars. mongod.log is pretty huge since it contains oplog from a live DB, I hope it's not a problem. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dmitry Agranat [ 01/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Would you please archive (tar or zip) the mongod.log files and the $dbpath/diagnostic.data directory (the contents are described here) covering the time of the reported issue and upload them to this support uploader? Files uploaded to this portal are visible only to MongoDB employees and are routinely deleted after some time. Thanks, |