I was working with a developer yesterday due to tables not loading properly on my site (and then the site crashing once they were for a period of time), and long story short he noted an issue with the Master-Detail Tables plugin. Here is his message / report to me on it:
Master-Detail Tables for wpDataTables is altering wpdatatables_columns on any request(homepage, admin, background ajax), this is a heavy request to change table structure and it should do it only on plugin updating or activation. The code does not have any conditions and executes it each time (https://fn0.io/0513vrws3uu4n700.png).
ALTER TABLE blocks reads (not just writes) at the point where it is ready to clear outdated table structures from the table and table definition caches. At this point, it must acquire an exclusive lock. To do so, it waits for current readers to finish, and blocks new reads and writes (https://fn0.io/05135h12w1xchc00.png).
When concurrent requests are trying to rebuild the table and fetch data it can damage DB, what was happened today(I saw that table as 'in use' with damaged structure with data).
MariaDB gave me the ability to recreate this table in the MyISAM engine and did not give the ability to convert to InnoDB(filesystem error). The site can work on this engine if the table does not have frequent row updates.
But ALTER TABLE request is collapsing and is freezing DB performance and I was restarting it every 5 min.
Stack of concurrent queries in DB queue: https://fn0.io/0513rp66v5no7t00.png
When the table uses the InnoDB engine and it executes very fast, the problem looks invisible https://fn0.io/0513mvla49ysly00.png. Anyway, it's slow down the site(it locks the table for parallel requests).
I re-created DB and converted this table to InnoDB format and the site is working faster like before. Let me know if you have any problems.
I commented line in plugin code: https://fn0.io/05138rs41okdj401.png, but I think the team should fix it.
That was the end of his note relevant to the plugin. Anyhow, if you can look into this on your end and maybe update the plugin accordingly or pass on any response needed back to him, that would be great.
I was working with a developer yesterday due to tables not loading properly on my site (and then the site crashing once they were for a period of time), and long story short he noted an issue with the Master-Detail Tables plugin. Here is his message / report to me on it:
Master-Detail Tables for wpDataTables is altering wpdatatables_columns on any request(homepage, admin, background ajax), this is a heavy request to change table structure and it should do it only on plugin updating or activation. The code does not have any conditions and executes it each time (https://fn0.io/0513vrws3uu4n700.png).
ALTER TABLE blocks reads (not just writes) at the point where it is ready to clear outdated table structures from the table and table definition caches. At this point, it must acquire an exclusive lock. To do so, it waits for current readers to finish, and blocks new reads and writes (https://fn0.io/05135h12w1xchc00.png).
When concurrent requests are trying to rebuild the table and fetch data it can damage DB, what was happened today(I saw that table as 'in use' with damaged structure with data).
MariaDB gave me the ability to recreate this table in the MyISAM engine and did not give the ability to convert to InnoDB(filesystem error). The site can work on this engine if the table does not have frequent row updates. But ALTER TABLE request is collapsing and is freezing DB performance and I was restarting it every 5 min. Stack of concurrent queries in DB queue: https://fn0.io/0513rp66v5no7t00.png
When the table uses the InnoDB engine and it executes very fast, the problem looks invisible https://fn0.io/0513mvla49ysly00.png. Anyway, it's slow down the site(it locks the table for parallel requests).
I re-created DB and converted this table to InnoDB format and the site is working faster like before. Let me know if you have any problems. I commented line in plugin code: https://fn0.io/05138rs41okdj401.png, but I think the team should fix it.
That was the end of his note relevant to the plugin. Anyhow, if you can look into this on your end and maybe update the plugin accordingly or pass on any response needed back to him, that would be great.
Thanks,
Jesse
Hello Jesse
Thank you for reporting this to us.
The issue has been forwarded to our development team, and they said they will work on finding a solution for it.
Hopefully it will be soon enough, but I can't promise any dates.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Ok I understand, thank you for the follow up.