4 ms·
> I think this seems a pretty insane way of doing it; why not change the default behavior instead of making another driver with a separate name as well as keepi
by msbarnett 14y ago
> I think this seems a pretty insane way of doing it; why not change the default behavior instead of making another driver with a separate name as well as keeping the old one too?
Because, as they clearly explain in their rationale, that would break compatibility with all of the existing software out there that relies on the current semantics.
Thou Shalt Not Break Working Code is the first rule of building software that other software relies on.
They're deprecating but retaining the old driver to give people a transition period in which to modify their software instead of kicking them in the teeth immediately or forcing them to hold off on upgrading. That's the mature approach to fixing mistakes that people nonetheless built assumptions around.
- ukd1 14y agoWhat does it break? This new default makes it behave as most users of it would have expected it too when writing their code. IMHO the users who require un-safe writes will be the ones to read this kind of news and notice and could alter it, if needed. I don't think this is true vice versa.
- jamesaguilar 14y agoIf people are relying on the current speed, changing the default to safe would break them.
- mathias_10gen 14y agoOne case that could break by this change is if you relied on insert's old default of being a no-op if an object with the same _id already exists. This can be used to efficiently insert a default document without race conditions. Example at https://github.com/RedBeard0531/Mongurl/blob/master/mongurl.py#L51-57 https://github.com/RedBeard0531/Mongurl/blob/master/mongurl.... That said, it makes sense for this to be opt-in behavior rather than the default.