DB Index Issue After Upgrading 1.6.0 *IMPORTAT*



  • Team,

    This is affecting our production environment so I hope you can help me out in finding a solution.

    We have a serious issue with our forum after upgrade to 1.6.0.

    When I open a topic I see replies showing up from different / unrelated / even older topics.
    When I click to send a PM to another user it adds unrelated users to the chat.

    It seems to be a problem with the database index but I'm not sure how to troubleshoot this.

    I try:

    > use nodebb
    switched to db nodebb
    > db.repairDatabase()
    { "ok" : 1 }
    > 
    

    A reply made 4 minutes ago got a automatic inserted reply from 4 days ago...

    0_1505593975840_Screen Shot 2017-09-16 at 22.31.57.png


  • Global Moderator

    You might try db.objects.reIndex()



  • @PitaJ Thanks for the response trying now.

    Meanwhile I was gathering more debug info.

    MongoDB is with WiredTiger, set up correctly.

    ubuntu@PyForum:~/nodebb$ ./nodebb setup
    16/9 20:51:05 [22978] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    
    16/9 20:51:05 [22978] - info: Now configuring mongo database:
    Configuration Saved OK
    16/9 20:51:05 [22978] - info: [database] Checking database indices.
    16/9 20:51:05 [22978] - info: [database] Checking database indices done!
    Populating database with default configs, if not already set...
    Previous theme detected, skipping enabling default theme
    Categories OK. Found 34 categories.
    Administrator found, skipping Admin setup
    16/9 20:51:06 [22978] - info: Global Moderators group found, skipping creation!
    Enabling default plugins
    16/9 20:51:06 [22978] - info: [install/defaultPlugins] customDefaults
    16/9 20:51:06 [22978] - info: [install/enableDefaultPlugins] activating default plugins 0=nodebb-plugin-composer-default, 1=nodebb-plugin-markdown, 2=nodebb-plugin-mentions, 3=nodebb-widget-essentials, 4=nodebb-rewards-essentials, 5=nodebb-plugin-soundpack-default, 6=nodebb-plugin-emoji-extended, 7=nodebb-plugin-emoji-one
    16/9 20:51:06 [22978] - info: [build] Building in parallel mode
    16/9 20:51:06 [22978] - info: [build]         plugin static dirs  build started
    16/9 20:51:06 [22978] - info: [build]          requirejs modules  build started
    16/9 20:51:06 [22978] - info: [build]           client js bundle  build started
    16/9 20:51:06 [22978] - info: [build]            admin js bundle  build started
    16/9 20:51:06 [22978] - info: [build]         client side styles  build started
    16/9 20:51:06 [22978] - info: [build] admin control panel styles  build started
    16/9 20:51:06 [22978] - info: [build]                  templates  build started
    16/9 20:51:06 [22978] - info: [build]                  languages  build started
    16/9 20:51:06 [22978] - info: [build]                     sounds  build started
    16/9 20:51:09 [22978] - info: [build]            admin js bundle  build completed in 2.083sec
    16/9 20:51:11 [22978] - info: [build]           client js bundle  build completed in 4.213sec
    16/9 20:51:11 [22978] - info: [build]                     sounds  build completed in 4.216sec
    16/9 20:51:11 [22978] - info: [build]         plugin static dirs  build completed in 4.582sec
    16/9 20:51:19 [22978] - info: [build]         client side styles  build completed in 12.21sec
    16/9 20:51:19 [22978] - info: [build] admin control panel styles  build completed in 12.209sec
    16/9 20:51:19 [22978] - info: [build]          requirejs modules  build completed in 12.221sec
    16/9 20:51:19 [22978] - info: [build]                  templates  build completed in 12.974sec
    16/9 20:51:21 [22978] - info: [build]                  languages  build completed in 14.137sec
    16/9 20:51:21 [22978] - info: [build] Asset compilation successful. Completed in 14.149sec.
    
         ======================================================================================================================================================================================================
    
    NodeBB Setup Completed. Run './nodebb start' to manually start your NodeBB server.
    
    > use nodebb
    switched to db nodebb
    > 
    > 
    > db.objects.reIndex()
    {
    	"nIndexesWas" : 4,
    	"nIndexes" : 4,
    	"indexes" : [
    		{
    			"key" : {
    				"_id" : 1
    			},
    			"name" : "_id_",
    			"ns" : "nodebb.objects"
    		},
    		{
    			"unique" : true,
    			"key" : {
    				"_key" : 1,
    				"value" : -1
    			},
    			"name" : "_key_1_value_-1",
    			"ns" : "nodebb.objects",
    			"background" : true,
    			"sparse" : true
    		},
    		{
    			"key" : {
    				"_key" : 1,
    				"score" : -1
    			},
    			"name" : "_key_1_score_-1",
    			"ns" : "nodebb.objects",
    			"background" : true
    		},
    		{
    			"key" : {
    				"expireAt" : 1
    			},
    			"name" : "expireAt_1",
    			"ns" : "nodebb.objects",
    			"expireAfterSeconds" : 0,
    			"background" : true
    		}
    	],
    	"ok" : 1
    }
    > 
    


  • It does not seem to have fixed the issue :(

    Its weird that it happened under the same configuration. I am not sure to rule out a nodebb or mongo issue yet.


  • Global Moderator

    Did you make a backup before upgrading? My next step would be restoring the db backup.



  • @PitaJ I did I am proceeding to scp it into the server and restore it.

    But if its something corrupting the db after it gets restored it will not be visible correct ?

    Be right back with news.



  • It looks to have fixed after a freshly re run of mongorestore.

    Thanks for the support!!


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.