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

Provide mechanism to determine which kind of process is logging a message during test output

    • Fully Compatible
    • QuInt A (10/12/15)

      Currently in the logs of our test output, mongod or mongos processes started by the test have log lines with the following format:

      [js_test:<test name>] <timestamp>  m<port>| <message>
      

      For example:

      [js_test:stepdown_long_wait_time] 2015-08-28T04:30:18.299-0400  m31000| 2015-08-28T04:30:18.297-0400 I CONTROL  [main] ** WARNING: --rest is specified without --httpinterface,
      

      Engineers that have experience with ReplSetTest and ShardingTest can tell which nodes are likely to be a mongos, a primary node, or a config server based on the port it's running on. (e.g 30999 for mongos, 29000-29002 for config servers, 31000+ for regular mongod's)

      We should move away from this special association of ports with certain types of nodes/processes. Instead, the

       m31000|
      

      part of the log message should include the information about which kind of process it is. Something like:

       md28343| <message from regular mongod>
        s37821| <message from mongos>
      cfg21821| <message from config server>
      

      This will make the logic of allocating ports for parallel testing much simpler, and hopefully will make reading the logs easier.

      Even with this information, it would still be nice to group nodes of a replica set to have similar ports, or mongos's for the same cluster.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: