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

wtimeout with tagsets never returns

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • 2.2.0
    • Replication
    • None
    • Linux
    • Hide
      • Configure couple of nodes in a replicaset with couple of tags
      • Configure a GLE mode using those tags
      • Issue a write
      • (optionally verify the write got replicated)
      • Call GLE with the tag and a timeout
      Show
      Configure couple of nodes in a replicaset with couple of tags Configure a GLE mode using those tags Issue a write (optionally verify the write got replicated) Call GLE with the tag and a timeout

    Description

      When passing in a wtimeout to GLE with tag name, the query never returns - even though it got replicated just fine.

      RS:PRIMARY> rs.status()
      {
      	"set" : "RS",
      	"date" : ISODate("2012-11-30T01:22:15Z"),
      	"myState" : 1,
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "primary.rs.local:27017",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 4322154,
      			"optime" : Timestamp(1354238383000, 1),
      			"optimeDate" : ISODate("2012-11-30T01:19:43Z"),
      			"self" : true
      		},
      		{
      			"_id" : 1,
      			"name" : "secondary.rs.local:27017",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 12060,
      			"optime" : Timestamp(1354238383000, 1),
      			"optimeDate" : ISODate("2012-11-30T01:19:43Z"),
      			"lastHeartbeat" : ISODate("2012-11-30T01:22:13Z"),
      			"pingMs" : 0
      		},
      		{
      			"_id" : 2,
      			"name" : "tertiary.rs.local:27017",
      			"health" : 1,
      			"state" : 7,
      			"stateStr" : "ARBITER",
      			"uptime" : 1319,
      			"lastHeartbeat" : ISODate("2012-11-30T01:22:14Z"),
      			"pingMs" : 0
      		}
      	],
      	"ok" : 1
      }
      RS:PRIMARY> rs.conf()
      {
      	"_id" : "RS",
      	"version" : 2,
      	"members" : [
      		{
      			"_id" : 0,
      			"host" : "primary.rs.local:27017",
      			"priority" : 20,
      			"tags" : {
      				"dc" : "ny",
      				"important" : "A"
      			}
      		},
      		{
      			"_id" : 1,
      			"host" : "secondary.rs.local:27017",
      			"priority" : 10,
      			"tags" : {
      				"dc" : "sf",
      				"important" : "C"
      			}
      		},
      		{
      			"_id" : 2,
      			"host" : "tertiary.rs.local:27017",
      			"arbiterOnly" : true
      		}
      	],
      	"settings" : {
      		"getLastErrorModes" : {
      			"default" : {
      				"important" : 2,
      				"dc" : 2
      			}
      		}
      	}
      }
      RS:PRIMARY> use blogs
      switched to db blogs
      RS:PRIMARY> db.articles.insert({"title": "hello world"});
      RS:PRIMARY> rs.status()
      {
      	"set" : "RS",
      	"date" : ISODate("2012-11-30T01:23:01Z"),
      	"myState" : 1,
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "primary.rs.local:27017",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"uptime" : 4322200,
      			"optime" : Timestamp(1354238561000, 1),
      			"optimeDate" : ISODate("2012-11-30T01:22:41Z"),
      			"self" : true
      		},
      		{
      			"_id" : 1,
      			"name" : "secondary.rs.local:27017",
      			"health" : 1,
      			"state" : 2,
      			"stateStr" : "SECONDARY",
      			"uptime" : 12106,
      			"optime" : Timestamp(1354238561000, 1),
      			"optimeDate" : ISODate("2012-11-30T01:22:41Z"),
      			"lastHeartbeat" : ISODate("2012-11-30T01:22:59Z"),
      			"pingMs" : 0
      		},
      		{
      			"_id" : 2,
      			"name" : "tertiary.rs.local:27017",
      			"health" : 1,
      			"state" : 7,
      			"stateStr" : "ARBITER",
      			"uptime" : 1365,
      			"lastHeartbeat" : ISODate("2012-11-30T01:23:00Z"),
      			"pingMs" : 0
      		}
      	],
      	"ok" : 1
      }
      RS:PRIMARY> db.getLastError("default", 500);
      timeout
      RS:PRIMARY> db.getLastErrorObj("default", 500);
      {
      	"n" : 0,
      	"lastOp" : Timestamp(1354238561000, 1),
      	"connectionId" : 62860,
      	"wtimeout" : true,
      	"waited" : 500,
      	"err" : "timeout",
      	"ok" : 1
      }

      Attachments

        1. 2.2.0.txt
          20 kB
        2. tags_timeout.js
          1 kB

        Activity

          People

            Unassigned Unassigned
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: