Giter Site home page Giter Site logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
As the title suggests this is a MySQL limitation that stopped+shutdown slaves 
(or slaves under snapshot) with open temporary tables turn to be inconsistent.

So question is how far shall I go to go around this MySQL bug/problem.

I'm using MyISAM temporary tables for the main reasons that they are fast to 
create/drop and are non persistent (if anything crashes, I don't need to 
maintain a "tables I should be dropping later on" list).

If I'm going to use persistent tables, I won't dare use MyISAM. As result, I 
will be using InnoDB, which will turn all DDL to be very slow; so this is a 
tight corner.

If you know of a good solution please let me know.

Original comment by [email protected] on 19 May 2013 at 6:40

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
I could use CONNECTION_ID() for naming the tables, and do a cleanup for all 
tables with IDs not in PROCESSLIST. Someone will have to pay for this cleanup; 
namely, other script executions. Cleanup is required in case of crash or 
premature termination of script. Typically this would not happen, but one can 
never know. 
Still, in some operations such as split() I create supporting tables while the 
script executes. I would hate to create these as normal tables; I've already 
seen the impact of (temporary) innodb tables creation on scripting -- it's 
disastrous.

Original comment by [email protected] on 19 May 2013 at 10:06

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
I'm not sure there is a perfect workaround for this. I wonder if things
like split() that will potentially amortize the cost of creating the temp
table over time can stand the cost of creating it with innodb.

Original comment by baron.schwartz on 20 May 2013 at 11:53

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
I can see how this is a serious issue for long running scripts (never releasing 
the temporary tables, thereby not allowing for safe slave shutdown). Need to 
think this over.

Original comment by [email protected] on 21 May 2013 at 4:35

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Will attempt using the following tables:
  _sql_tokens
  _qs_variables
  _script_report_data
  _split_column_names_table

as global (standard) InnoDB tables. 

Will add a "session_id" (== CONNECTION_ID()) column to each

Where possible (certainly in _sql_tokens), will currently rename tables and add 
view under same original name which only filters appropriate rows.

Upon script termination / split termination, will cleanup tables
Upon script startap / split startup, will cleanup tables for same 
CONNECTION_ID()

May need to support additoinal "queryscript_cleanup()" routine to handle 
leftover from aborted scripts

Original comment by [email protected] on 26 May 2013 at 10:04

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024

Original comment by [email protected] on 2 Jun 2013 at 2:44

  • Changed state: Started

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Fixed in revision 468 (not yet released)

Original comment by [email protected] on 3 Jun 2013 at 5:47

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024

Original comment by [email protected] on 3 Jun 2013 at 5:47

  • Changed state: Verified

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Attached temporary build file

Original comment by [email protected] on 3 Jun 2013 at 5:58

Attachments:

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Thanks! Looks like there is still a (very small, reasonable) chance of this 
problem happening but this should be much improved.

Original comment by baron.schwartz on 3 Jun 2013 at 5:12

from common-schema.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
Temporary tables are now only created per split() operation, and for the 
duration of table analysis; so 
CREATE-CREATE-CREATE-CREATE-SELECT-DROP-DROP-DROP-DROP. Tables are dropped 
before actually iterating the split() statement, so should be very short period.

Original comment by [email protected] on 3 Jun 2013 at 7:31

from common-schema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.