Mailing List Archive

Re: Ticket #13517: Reducing memory usage by mythfilldatabase to 1/6 of original usage
On Sun, Feb 16, 2020 at 9:12 AM MythTV <noreply@mythtv.org> wrote:

> #13517: Reducing memory usage by mythfilldatabase to 1/6 of original usage
> ---------------------------------------+-------------------------------
> Reporter: Hans Dingemans | Owner: Peter Bennett
> Type: Patch - Feature | Status: assigned
> Priority: minor | Milestone: needs_triage
> Component: MythTV - Mythfilldatabase | Version: Master Head
> Severity: medium | Resolution:
> Keywords: | Ticket locked: 0
> ---------------------------------------+-------------------------------
>
> Comment (by Peter Bennett):
>
> Gary - thank you for your valuable input.
>
> Hans -
> Regarding using database rollback - MythTV uses autocommit throughout, so
> I don't think that is an option.
>
That won't be a problem; from the MYSQL manual:

To disable autocommit mode implicitly for a single series of statements,
use the START TRANSACTION statement:

With START TRANSACTION, autocommit remains *disabled until you end the
transaction with COMMIT or ROLLBACK.* The autocommit mode then reverts to
its previous state.


> Does the system complete parsing before updating the database?

Yes.

> If so it
> should be easy to reject the whole run if there is an error.
>
Yes this patch it does that already; however, I'll test a few of the cases
Gary described, and come back to you, because I am not sure if the XML
syntax checking is as accurate with QXmlStreamReader as it is with
XDomDocument; I guess only the library maintainers know for sure :-)

>
> When updating the database does it first delete old data? If so it would
> be dangerous to accept a half complete run because the program data may be
> deleted and not replaced.
>
> --
> Ticket URL: <https://code.mythtv.org/trac/ticket/13517#comment:11>
> MythTV <http://www.mythtv.org>
> MythTV Media Center
>

Greetings, Hans.
Re: Ticket #13517: Reducing memory usage by mythfilldatabase to 1/6 of original usage [ In reply to ]
On Sun, Feb 16, 2020 at 03:33:21PM -0500, Hans Dingemans wrote:
> On Sun, Feb 16, 2020 at 9:12 AM MythTV <noreply@mythtv.org> wrote:
>
> > #13517: Reducing memory usage by mythfilldatabase to 1/6 of original usage
> > ---------------------------------------+-------------------------------
> > Reporter: Hans Dingemans | Owner: Peter Bennett
> > Type: Patch - Feature | Status: assigned
> > Priority: minor | Milestone: needs_triage
> > Component: MythTV - Mythfilldatabase | Version: Master Head
> > Severity: medium | Resolution:
> > Keywords: | Ticket locked: 0
> > ---------------------------------------+-------------------------------
> >
> > Comment (by Peter Bennett):
> >
> > Gary - thank you for your valuable input.
> >
> > Hans -
> > Regarding using database rollback - MythTV uses autocommit throughout, so
> > I don't think that is an option.
> >
> That won't be a problem; from the MYSQL manual:
>
> To disable autocommit mode implicitly for a single series of statements,
> use the START TRANSACTION statement:
>
> With START TRANSACTION, autocommit remains *disabled until you end the
> transaction with COMMIT or ROLLBACK.* The autocommit mode then reverts to
> its previous state.

Mike Dean is our primary, database expert. I'll defer to him when/if
he chimes in. However, my understanding is that MythTV only
officially supports tables using the MyISAM, storage engine and that
that storage engine doesn't support transactions.

David

> > Does the system complete parsing before updating the database?
>
> Yes.
>
> > If so it
> > should be easy to reject the whole run if there is an error.
> >
> Yes this patch it does that already; however, I'll test a few of the cases
> Gary described, and come back to you, because I am not sure if the XML
> syntax checking is as accurate with QXmlStreamReader as it is with
> XDomDocument; I guess only the library maintainers know for sure :-)
>
> >
> > When updating the database does it first delete old data? If so it would
> > be dangerous to accept a half complete run because the program data may be
> > deleted and not replaced.
> >
> > --
> > Ticket URL: <https://code.mythtv.org/trac/ticket/13517#comment:11>
> > MythTV <http://www.mythtv.org>
> > MythTV Media Center
> >
>
> Greetings, Hans.

> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org