[SERVER-36801] "mongos collstats doesn't know about" clusterTime fields warning in 3.6 Created: 22/Aug/18 Updated: 12/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | 章 黒鉄 | Assignee: | Backlog - Cluster Scalability |
| Resolution: | Unresolved | Votes: | 7 |
| Labels: | ShardingRoughEdges, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Cluster Scalability
|
||||||||
| Sprint: | Sharding 2018-09-24 | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
In our logs we regularly find the following lines with "W" severity coming from out 3.6 cluster mongos routers:
It seems this warning was added in MongoDB v1.8 as reasonable warning against fields that shouldn't be included when executing the command on a mongos router ( I see in the v4.0 code it doesn't have this logic any more, but we won't be moving to 4.0 anytime soon. So just for the next minor version in the v3.6 branch could that block of code in the mongo/s/commands/commands_public.cpp file's CollectionStats::run() function be fixed to also ignore the "operationTime", "gleStats", "clusterTime", "configServerState" fields? |
| Comments |
| Comment by Spencer Brown [ 01/Jul/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This message is also occurring in mongos 4.0.24. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kevin Pulo [ 20/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, got it, thanks. We can keep this ticket for the log noise, and if you can open a support ticket to investigate the other issues (if you haven't already), then that would be best. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 章 黒鉄 [ 20/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry, I wasn't clear. My intention when sharing this was to say 'here are some coinciding symptoms I've noticed since'.
So yes what is causing them is not the thing that makes the log message, I just wanted to share more parts of the picture I encountered later in case that helps. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kevin Pulo [ 20/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can't see how this message could cause the mongos to sometimes target the wrong set of shards, or to otherwise return partial results, or affect dataSize in this way. Surely that must be some other problem(s), with some other cause (especially if FCV fixes it), which would be best investigated in a support context? Or have I misunderstood? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 章 黒鉄 [ 19/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@kevin.pulo I iterated through the 500+ mongos nodes we have attached to the this cluster at the moment and I've found two that still reproduce the error when running collStats. Furthermore one of them also fails to execute dataSize:
Want me to poke around with this whilst the in-memory state is still screwy? The database namespace in question will be dropped soon. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 章 黒鉄 [ 16/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ah wait, I found this is not just log noise, it also causes truncation of the data in the sporadic cases it occurs. E.g. we have a 4924626332 + 4698330239 + 4855230485 + 4234303379 + 5047820027 = 22GB datasize "options" collection in the "search2" db. Here is collStats run on each shard directly
This is what I got when I ran it on one mongos node before running flushRouterConfig. This particular mongos node is a DBA-use one that had high uptime and rarely any user db writes coming through it.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 章 黒鉄 [ 15/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
My suggested patch was just working with the paradigm in place, so pretty dull I agree. I just wanted some log noise to go away sooner rather than later. As the purpose of this log message seems to be to notify when future development breaks the logic, deleting it and creating a unit test instead is better I guess. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kevin Pulo [ 15/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
As a general principle, commands that are intolerant of unexpected (but harmless) fields tend to be backward-brittle and just make upgrades/multi-version issues needlessly complicated and annoying. Rather than manufacturing busywork for ourselves whenever a new meta field is added, can we just get rid of this message? Is there actually any value in it anymore? Another option is to just change it to LOG(1) or 2. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by 章 黒鉄 [ 23/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
That's true, I am a signed-up contributor since before I worked at MongoDB even. I'm blocked from pushing to any external git repo at work though. On the basis that appendRequiredFieldsToResponse() in strategy.cpp is already doing the right thing regarding the "operationTime" and "$clusterTime" fields that make it out in the top level of the collStats output, or is doing the best that the 3.6 branch ever will, the patch I suggest is:
I.e. skip them to avoid the last else that would complain about those fields because they're unknown to the shard-iterating block that sums count, sums size, recalcs avgObjSize, etc. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kelsey Schubert [ 22/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi akira, Would you like to open a pull request with the changes you've suggested? It looks like you've already signed the contributor agreement a while back Best wishes, |