|
The initial idea of referring to a chunk manager object with a shared pointer (instead of a raw one) does not resolve the problem since the life type of the collection metadata is the actual root cause of the issue. Indeed, the collection metadata is deleted while and insert/update operation is in progress on the secondaries, causing a memory access violation (dangling pointer error) of the chunk manager.
The findIntersectingChunkWithSimpleCollation function, which triggers the described problem, will no longer be used in 6.0 branch and higher (see SERVER-70758). As for the other branches, a synchronization mechanism would be needed to ensure that the collection metadata was not deleted while an insert/update operation is in progress on the secondaries. After a discussion with pierlauro.sciarelli@mongodb.com, a proper solution would be costly in terms of performance, as well as development.
Considering that a problem of this nature has never occurred in real environments (external customers), we believe it is appropriate to ignore the problem on old branches, at least for now. Closing as won’t fix.
|