---------- Forwarded message ---------- From: Juerg Bircher <[email protected]> Date: Sat, May 28, 2016 at 10:30 PM Subject: Re: (ITS#8430) Improved handling for large number of databases To: Hallvard Breien Furuseth <[email protected]>
On Sat, May 28, 2016 at 3:41 AM, Hallvard Breien Furuseth <[email protected]> wrote: > On 28/05/16 03:28, Hallvard Breien Furuseth wrote: >> >> On 27/05/16 23:39, [email protected] wrote: >>> >>> Maybe I am overseeing something as I do not know all the thoughts >>> between the lines. >> >> >> With ITS#8431 I can think of one thing: >> (...blah...) > > > Actually the main reason I worry about lazy init is simply that > we've screwed up DBIs many times, so I prefer to go slowly. > That's Howard's call though, not mine. Maybe a good way in between could be to memcpy txn->mt_env->me_dbflags. However md_flags would need to be moved out of the MDB_dbi struct like mt_dbflags or easier just add another array serving as snapshot. This would not break anything with flag initialization as we get a snapshot of them in the mdb_txn_renew0. memcpy uses SSE instructions for x86_64. We should consider to align on 16 byte boundary for best performance. The dbflags could then still be initialized with MDB_UNSUSED as suggested.
