-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.2, 2.1.0
-
Component/s: Sharding
-
None
-
Sharding
-
ALL
If a config server has activeWindow set as in the documentation: { activeWindow :
{ start : "9:00", stop : "21:00" }}
... it is ambiguous what time zone those hours are in. Mongos compares its local time to the active window:
https://github.com/mongodb/mongo/blob/master/src/mongo/s/grid.cpp#L447
If mongos is running on a machine with a different time zone than whatever zone the administrator was thinking of when s/he configured the activeWindow, then mongos will balance outside the intended window. If different mongoses are in different zones, they will use different balancing windows.
Suggested fixes: backward-breaking change to specify that activeWindow is time of day UTC, use universal_time() in mongos.
Or, activeWindow is specified as being in the config server's time zone, and the config server implements a new command, shouldBalance, and mongoses run the command on the config server to see if they should balance now.
Or, activeWindow is specified as being in the config server's time zone, and config servers report their offset from UTC so mongoses can convert the window to UTC before checking if they should balance.
Or, activeWindow contains an offset which is reported to mongos.
- is duplicated by
-
SERVER-9216 Handle mongos' with different timezones when setting balancer window
- Closed
- is related to
-
SERVER-4587 Be consistent with time zones
- Backlog
-
SERVER-18785 Store mongos timezone in config.mongos pings
- Closed