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

An error document is returned with result set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.10, 3.0.4
    • Fix Version/s: 2.6.12, 3.0.9
    • Component/s: Querying, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      Import Enron message data.

      On a sharded cluster

      mongos> db.messages.count()
      120477
      mongos> db.messages.getIndexes()
      [
      	{
      		"v" : 1,
      		"key" : {
      			"_id" : 1
      		},
      		"name" : "_id_",
      		"ns" : "enron.messages"
      	},
      	{
      		"v" : 1,
      		"key" : {
      			"headers.From" : 1,
      			"headers.Date" : 1
      		},
      		"name" : "headers.From_1_headers.Date_1",
      		"ns" : "enron.messages"
      	}
      ]
      mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).sort({'headers.Date':1}).batchSize(10);
      { "headers" : { "Date" : ISODate("2001-02-01T06:10:00Z"), "From" : "tracy.geaccone@enron.com", "Subject" : "Re: Transition Issues" } }
      { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
      { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
      { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } }
      { "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } }
      { "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } }
      Type "it" for more
      mongos> it
      { "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
      { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } }
      Error: error: {
      	"$err" : "getMore executor error: Overflow sort stage buffered data usage of 33557210 bytes exceeds internal limit of 33554432 bytes",
      	"code" : 17406
      }
      

      Show
      Import Enron message data. On a sharded cluster mongos> db.messages.count() 120477 mongos> db.messages.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "enron.messages" }, { "v" : 1, "key" : { "headers.From" : 1, "headers.Date" : 1 }, "name" : "headers.From_1_headers.Date_1", "ns" : "enron.messages" } ] mongos> db.messages.find({},{_id:0,'headers.From':1,'headers.Subject':1,'headers.Date':1}).sort({'headers.Date':1}).batchSize(10); { "headers" : { "Date" : ISODate("2001-02-01T06:10:00Z"), "From" : "tracy.geaccone@enron.com", "Subject" : "Re: Transition Issues" } } { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } } { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } } { "headers" : { "Date" : ISODate("2001-02-01T06:17:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Vacation day Feb. 16" } } { "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } } { "headers" : { "Date" : ISODate("2001-02-01T06:53:00Z"), "From" : "stinson.gibner@enron.com", "Subject" : "Re: P+ spread options" } } { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } } { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } } { "headers" : { "Date" : ISODate("2001-02-01T07:00:00Z"), "From" : "matt.smith@enron.com", "Subject" : "Re: fun" } } { "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } } { "headers" : { "Date" : ISODate("2001-02-01T07:07:00Z"), "From" : "phil.demoes@enron.com", "Subject" : "Re: Transco Z4/Z5 curves for Piedmont" } } { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } } { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } } { "headers" : { "Date" : ISODate("2001-02-01T07:20:00Z"), "From" : "mary.poorman@enron.com", "Subject" : "Re: Meter 986315 for 10/00" } } { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } } { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } } { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } } { "headers" : { "Date" : ISODate("2001-02-01T07:29:00Z"), "From" : "robin.rodrigue@enron.com", "Subject" : "VAR" } } { "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } } { "headers" : { "Date" : ISODate("2001-02-01T07:30:00Z"), "From" : "michael.tribolet@enron.com", "Subject" : "Re: LA Times article" } } Type "it" for more mongos> it { "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } } { "headers" : { "Date" : ISODate("2001-02-01T07:32:00Z"), "From" : "chris.germany@enron.com", "Subject" : "Re: Insurance dough" } } { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } } { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } } { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } } { "headers" : { "Date" : ISODate("2001-02-01T07:35:00Z"), "From" : "tori.kuykendall@enron.com", "Subject" : "" } } Error: error: { "$err" : "getMore executor error: Overflow sort stage buffered data usage of 33557210 bytes exceeds internal limit of 33554432 bytes", "code" : 17406 }
    • Sprint:
      Sharding 9 (09/18/15), Sharding D (12/11/15), Sharding E (01/08/16)

      Description

      A query to a sufficiently large sharded collection that requires a sort on an unindexed field and a sufficiently small batch size results in a result set with batch size number of documents plus an error document from each shard returning results.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: