Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15464

Mongodb cannot find document with long string index

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.9
    • None
    • ALL
    • Hide

      From the mongo js shell, typing these command creates the errror.

      $ mongo 
      MongoDB shell version: 2.4.9
      connecting to: test
      > db.version()
      2.4.9
      > db.long_id.insert({_id: 'http://www.bdguitar.net/trf?&r=http%3A%2F%2F2361087.r.msn.com%2F%3Fld%3DDvtnvVkvTVvlcyiQRAkvzI9TVUCUzNt-k03Za_TH_DPqHNAE2IL-f0S4knenJNVK-bQ6zAV4Ui9OGd-qVEG8Euld5YDolJaOkCbGTa5Zk0cTGDIbJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgCyVK%2Fc8U0uyRyGnxWOK0k3GtQd5bQ%2B9UP5npDP%2F%2BBGHHvspaFhM5Sl3Juw0VlIsdAqlTsqwsQ%2FsLRZzt3wzvFFHDjodqb6hahFT79j0nkmFFE%2FJDgEKhXyTElAilVpM6OwBlEIlRVi5%2FHWbIkSxg0LQg82Si2cNe%2F7XCQ1rByQ96efBCz8T5QXgpIdOMns%2BOL21aEbtuPSm%2FkdLCNfbsDIHPh%2BCYFQe9zZnz7PtL8W0CPbsZKxxU7wSzDGaIDWRVCH4KKjJAqfVZp%2F2sBtEKVmZ9dk9rc9XhdHShJu4Vw%3D&c=290815445258863138792350&n=%2BHuIFyIxF27bZ5HpGWMf%2FD8fNLhF9xJk77xfYxQftbKcNdQxbIpqtQU7JTOHC8K2lM%2BquBWL3KuYsb5IjwoNwJG6hcxXPA8Fnm4cRIzsVNKcWCYZrlCvr8tsCsdAC27NRhWh5L5uHMAyaxle63CVTABavu7eE2Qmg6%2BfNKl7%2Bf1tcFiNbLvLw7RByRqEi6z8IOOGqQIgw%2FuEk%2BCL8w8tnUt%2F%2BIFyLIZvoWnvQJyHAXn2TfS%2FXR0hS6d6bRW3wFkZloL0JDGgwWdO9wHK4AR35c4XuoWonbIkeS6J3Kx8NkQ%2FfGIRuHu0995RiZuGKGCyhjDb2wxdGaWeSmW%2FUn2QtuXGnI57CcKH0xHCKndGqwGJ33RGlT5I0avD3JDnn1K3AV26drG4YcxFfCm0On2DIEWRSaYaeyPV7AiHrad%2F1%2F8DMbdnY5XcrNIzSeL9AQbq9clkfxied2l46O21%2BAJuXRAGgAndrlNMD5hQ%2FT0iHhc%3D'})
      > db.long_id.count()
      1
      > db.long_id.find({_id: 'http://www.bdguitar.net/trf?&r=http%3A%2F%2F2361087.r.msn.com%2F%3Fld%3DDvtnvVkvTVvlcyiQRAkvzI9TVUCUzNt-k03Za_TH_DPqHNAE2IL-f0S4knenJNVK-bQ6zAV4Ui9OGd-qVEG8Euld5YDolJaOkCbGTa5Zk0cTGDIbJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgCyVK%2Fc8U0uyRyGnxWOK0k3GtQd5bQ%2B9UP5npDP%2F%2BBGHHvspaFhM5Sl3Juw0VlIsdAqlTsqwsQ%2FsLRZzt3wzvFFHDjodqb6hahFT79j0nkmFFE%2FJDgEKhXyTElAilVpM6OwBlEIlRVi5%2FHWbIkSxg0LQg82Si2cNe%2F7XCQ1rByQ96efBCz8T5QXgpIdOMns%2BOL21aEbtuPSm%2FkdLCNfbsDIHPh%2BCYFQe9zZnz7PtL8W0CPbsZKxxU7wSzDGaIDWRVCH4KKjJAqfVZp%2F2sBtEKVmZ9dk9rc9XhdHShJu4Vw%3D&c=290815445258863138792350&n=%2BHuIFyIxF27bZ5HpGWMf%2FD8fNLhF9xJk77xfYxQftbKcNdQxbIpqtQU7JTOHC8K2lM%2BquBWL3KuYsb5IjwoNwJG6hcxXPA8Fnm4cRIzsVNKcWCYZrlCvr8tsCsdAC27NRhWh5L5uHMAyaxle63CVTABavu7eE2Qmg6%2BfNKl7%2Bf1tcFiNbLvLw7RByRqEi6z8IOOGqQIgw%2FuEk%2BCL8w8tnUt%2F%2BIFyLIZvoWnvQJyHAXn2TfS%2FXR0hS6d6bRW3wFkZloL0JDGgwWdO9wHK4AR35c4XuoWonbIkeS6J3Kx8NkQ%2FfGIRuHu0995RiZuGKGCyhjDb2wxdGaWeSmW%2FUn2QtuXGnI57CcKH0xHCKndGqwGJ33RGlT5I0avD3JDnn1K3AV26drG4YcxFfCm0On2DIEWRSaYaeyPV7AiHrad%2F1%2F8DMbdnY5XcrNIzSeL9AQbq9clkfxied2l46O21%2BAJuXRAGgAndrlNMD5hQ%2FT0iHhc%3D'})
      > db.long_id.count({_id: 'http://www.bdguitar.net/trf?&r=http%3A%2F%2F2361087.r.msn.com%2F%3Fld%3DDvtnvVkvTVvlcyiQRAkvzI9TVUCUzNt-k03Za_TH_DPqHNAE2IL-f0S4knenJNVK-bQ6zAV4Ui9OGd-qVEG8Euld5YDolJaOkCbGTa5Zk0cTGDIbJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgCyVK%2Fc8U0uyRyGnxWOK0k3GtQd5bQ%2B9UP5npDP%2F%2BBGHHvspaFhM5Sl3Juw0VlIsdAqlTsqwsQ%2FsLRZzt3wzvFFHDjodqb6hahFT79j0nkmFFE%2FJDgEKhXyTElAilVpM6OwBlEIlRVi5%2FHWbIkSxg0LQg82Si2cNe%2F7XCQ1rByQ96efBCz8T5QXgpIdOMns%2BOL21aEbtuPSm%2FkdLCNfbsDIHPh%2BCYFQe9zZnz7PtL8W0CPbsZKxxU7wSzDGaIDWRVCH4KKjJAqfVZp%2F2sBtEKVmZ9dk9rc9XhdHShJu4Vw%3D&c=290815445258863138792350&n=%2BHuIFyIxF27bZ5HpGWMf%2FD8fNLhF9xJk77xfYxQftbKcNdQxbIpqtQU7JTOHC8K2lM%2BquBWL3KuYsb5IjwoNwJG6hcxXPA8Fnm4cRIzsVNKcWCYZrlCvr8tsCsdAC27NRhWh5L5uHMAyaxle63CVTABavu7eE2Qmg6%2BfNKl7%2Bf1tcFiNbLvLw7RByRqEi6z8IOOGqQIgw%2FuEk%2BCL8w8tnUt%2F%2BIFyLIZvoWnvQJyHAXn2TfS%2FXR0hS6d6bRW3wFkZloL0JDGgwWdO9wHK4AR35c4XuoWonbIkeS6J3Kx8NkQ%2FfGIRuHu0995RiZuGKGCyhjDb2wxdGaWeSmW%2FUn2QtuXGnI57CcKH0xHCKndGqwGJ33RGlT5I0avD3JDnn1K3AV26drG4YcxFfCm0On2DIEWRSaYaeyPV7AiHrad%2F1%2F8DMbdnY5XcrNIzSeL9AQbq9clkfxied2l46O21%2BAJuXRAGgAndrlNMD5hQ%2FT0iHhc%3D'})
      0
      > 
      
      Show
      From the mongo js shell, typing these command creates the errror. $ mongo MongoDB shell version: 2.4.9 connecting to: test > db.version() 2.4.9 > db.long_id.insert({_id: 'http: //www.bdguitar.net/trf?&r=http%3A%2F%2F2361087.r.msn.com%2F%3Fld%3DDvtnvVkvTVvlcyiQRAkvzI9TVUCUzNt-k03Za_TH_DPqHNAE2IL-f0S4knenJNVK-bQ6zAV4Ui9OGd-qVEG8Euld5YDolJaOkCbGTa5Zk0cTGDIbJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgC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bJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgCyVK%2Fc8U0uyRyGnxWOK0k3GtQd5bQ%2B9UP5npDP%2F%2BBGHHvspaFhM5Sl3Juw0VlIsdAqlTsqwsQ%2FsLRZzt3wzvFFHDjodqb6hahFT79j0nkmFFE%2FJDgEKhXyTElAilVpM6OwBlEIlRVi5%2FHWbIkSxg0LQg82Si2cNe%2F7XCQ1rByQ96efBCz8T5QXgpIdOMns%2BOL21aEbtuPSm%2FkdLCNfbsDIHPh%2BCYFQe9zZnz7PtL8W0CPbsZKxxU7wSzDGaIDWRVCH4KKjJAqfVZp%2F2sBtEKVmZ9dk9rc9XhdHShJu4Vw%3D&c=290815445258863138792350&n=%2BHuIFyIxF27bZ5HpGWMf%2FD8fNLhF9xJk77xfYxQftbKcNdQxbIpqtQU7JTOHC8K2lM%2BquBWL3KuYsb5IjwoNwJG6hcxXPA8Fnm4cRIzsVNKcWCYZrlCvr8tsCsdAC27NRhWh5L5uHMAyaxle63CVTABavu7eE2Qmg6%2BfNKl7%2Bf1tcFiNbLvLw7RByRqEi6z8IOOGqQIgw%2FuEk%2BCL8w8tnUt%2F%2BIFyLIZvoWnvQJyHAXn2TfS%2FXR0hS6d6bRW3wFkZloL0JDGgwWdO9wHK4AR35c4XuoWonbIkeS6J3Kx8NkQ%2FfGIRuHu0995RiZuGKGCyhjDb2wxdGaWeSmW%2FUn2QtuXGnI57CcKH0xHCKndGqwGJ33RGlT5I0avD3JDnn1K3AV26drG4YcxFfCm0On2DIEWRSaYaeyPV7AiHrad%2F1%2F8DMbdnY5XcrNIzSeL9AQbq9clkfxied2l46O21%2BAJuXRAGgAndrlNMD5hQ%2FT0iHhc%3D' }) > db.long_id.count({_id: 'http: //www.bdguitar.net/trf?&r=http%3A%2F%2F2361087.r.msn.com%2F%3Fld%3DDvtnvVkvTVvlcyiQRAkvzI9TVUCUzNt-k03Za_TH_DPqHNAE2IL-f0S4knenJNVK-bQ6zAV4Ui9OGd-qVEG8Euld5YDolJaOkCbGTa5Zk0cTGDIbJhskwXoDI1lKd4dKYEfOawFw%26u%3Dhttp%253a%252f%252ftracking.deepsearch.adlucent.com%252fadlucent%252fRedirector%253fkwid%253dd9c886b904934c9ebe75d2f808774e8a%2526adid%253d2996956430%2526device%253du%2526retailer%253dmusic123%2526url%253dhttp%253a%252f%252fwww.musiciansfriend.com%252fguitars%253ffT%253d2002%25253Asite7A%25253A22042%25253Atopseller%2526source%253d3WWRWXGG%2526kwid%253dd9c886b904934c9ebe75d2f808774e8a%2526utm_source%253dbing%2526utm_medium%253dcpc%2526utm_campaign%253d%25255BADL%25255D%252520%25255BNon-Brand%25255D%252520%25255BUS%25255D%252520%25255BSearch%25255D%252520%25255BComputers%25255D%252520Generic%252520-%252520Guitars%252520-%252520%28Exact%29%2526utm_term%253dguitar&o=VgCyVK%2Fc8U0uyRyGnxWOK0k3GtQd5bQ%2B9UP5npDP%2F%2BBGHHvspaFhM5Sl3Juw0VlIsdAqlTsqwsQ%2FsLRZzt3wzvFFHDjodqb6hahFT79j0nkmFFE%2FJDgEKhXyTElAilVpM6OwBlEIlRVi5%2FHWbIkSxg0LQg82Si2cNe%2F7XCQ1rByQ96efBCz8T5QXgpIdOMns%2BOL21aEbtuPSm%2FkdLCNfbsDIHPh%2BCYFQe9zZnz7PtL8W0CPbsZKxxU7wSzDGaIDWRVCH4KKjJAqfVZp%2F2sBtEKVmZ9dk9rc9XhdHShJu4Vw%3D&c=290815445258863138792350&n=%2BHuIFyIxF27bZ5HpGWMf%2FD8fNLhF9xJk77xfYxQftbKcNdQxbIpqtQU7JTOHC8K2lM%2BquBWL3KuYsb5IjwoNwJG6hcxXPA8Fnm4cRIzsVNKcWCYZrlCvr8tsCsdAC27NRhWh5L5uHMAyaxle63CVTABavu7eE2Qmg6%2BfNKl7%2Bf1tcFiNbLvLw7RByRqEi6z8IOOGqQIgw%2FuEk%2BCL8w8tnUt%2F%2BIFyLIZvoWnvQJyHAXn2TfS%2FXR0hS6d6bRW3wFkZloL0JDGgwWdO9wHK4AR35c4XuoWonbIkeS6J3Kx8NkQ%2FfGIRuHu0995RiZuGKGCyhjDb2wxdGaWeSmW%2FUn2QtuXGnI57CcKH0xHCKndGqwGJ33RGlT5I0avD3JDnn1K3AV26drG4YcxFfCm0On2DIEWRSaYaeyPV7AiHrad%2F1%2F8DMbdnY5XcrNIzSeL9AQbq9clkfxied2l46O21%2BAJuXRAGgAndrlNMD5hQ%2FT0iHhc%3D' }) 0 >

      I've googled about this issue but couldn't find satisfactory solution. So I'm assuming is'a bug.

      If you insert a document having the _id type as string and the string is too long (in my case long url), it inserts successfully but find() operation doesn't reveal that document.

            Assignee:
            Unassigned Unassigned
            Reporter:
            Dewsworld Shamir Shakir [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: