On Wed, Dec 23, 2020 at 1:31 AM 陈佳昕(步真) <buzhen....@alibaba-inc.com> wrote: > I studied your patch these days and found there might be a problem. > When execute 'drop database', the smgr shared pool will not be removed > because of no call 'smgr_drop_sr'. Function 'dropdb' in dbcommands.c remove > the buffer from bufferpool and unlink the real files by 'rmtree', It doesn't > call smgrdounlinkall, so the smgr shared cache will not be dropped although > the table has been removed. This will cause some errors when smgr_alloc_str > -> smgropen、smgrimmedsync. Table file has been removed, so smgropen and > smgrimmedsync will get a unexpected result.
Hi Buzhen, Thanks, you're right -- it needs to scan the pool of SRs and forget everything from the database you're dropping.