Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep track of freestyle changes #1

Open
wants to merge 80 commits into
base: freestyler
Choose a base branch
from

Conversation

renormalist
Copy link
Collaborator

This is an experimental PR to track the changes of which I know are forked from the original reality.

...to correctly handle explicit LICENSE file.
Basically all =over's were unclosed, missing =back.
Fixed that.
The items seemed to look like a numbered list
but in fact meant the two hashes to be provided.

Reowrd this to use '1st hash' and '2nd hash' making
it less confusing.
...so we can automatically correlate the correct file.
...so they get available using File::ShareDir, like
for creating the DB with cmdline tools.
Basically copy'n'pasted from ::Query::mysql, and
replaced NOW() with CURRENT_TIMESTAMP.

More changes are expected to come while
reverse engineering how SQLite differs from
MySQL... :-)
...in order to find the bug on SQLite:

  no such column: bav2.bench_additional_value
        - Initial release - CPAN DAY - 2015-08-16
        - based on the released code from early 2014
        - This is a library to provide a schema for
          storing benchmark values in an SQL database
        - Primarily targets mysql, SQLite support
          is basically so far by cutting away known
          trouble maker SQL statement parts
        - Read more about the schema on http://benchmarkanything.org/
...to allow ultimate precision.
This avoids the error

  DBD::SQLite::db prepare failed: no such column: bav2.bench_additional_value
  at .../Tapper/Benchmark/Query.pm

probably by correctly using the SQLite pragmas

  full_column_names
  short_column_names

which at least can be configured to reproduce the error
in plain sqlite3 (though I don't have proof that this is the
ultimate solution to that problem).
        - store benchmark VALUEs as VARCHAR to avoid rounding
          and allow non-number values en passant
        - dependency++ to DBD::SQLite 1.48 to avoid error
          'no such column: bav2.bench_additional_value"
For key=value pairs where the key is undefined
we skip the whole pair. I am not sure it makes
sense but I need to avoid db errors resulting
from that.
When we insert similar entries it used to
insert similar fields and failed. Trying to
fix this with simple INSERT IGNORE statements,
for mysql and SQLite respectively.
For some reason it seems to Just Work(tm) in SQLite.
Let's see if explicitely updating the last inserted id
in mysql does the Right Thing.
        - handling of duplicates and undefined values
Quite some code duplication but we are
in stupid extension mode, refactoring
later this week.
        - get list of benchmark NAMEs
I am not exactly sure if this could be nested
but anyway we push/pop the old values so at
least that part works nested.
Currently this only covers the cleanup of
the queued and already processed raw_bench_bundle
rows, but other cleanup can be handled here, too.
        - queuing mode for high-throughput incoming results
          * part 1) adds raw results into separate table
          * part 2) process one of those values,
                    likely called in bundles or from multiple workers
          * part 3) garbage collect successfully processed results
When run with the same dbh and the
queuing code running with transactions,
it seems the garbage collection also
needs transactions.
        - enable transactions for garbage collector
Nested transactions don't work anyway, so the
use of a queue with push and pop was over-engineered.
Drop it to just setting a single old value.
Be crisp about UNSIGNED and use BLOB to never
hit any column limits, just in case...
...when all raw_bench_bundles are processed.
        - DB tuning/tweaking:
          * avoid deadlocks due to gap locking
          * fix missing finish_transaction
          * be crisp about UNSIGNED and use BLOB for raw queue
          * simplify resetting of AutoCommit mode
...and replace given/when with classic
if/elsif/else cascades.
        - drop feature 'switch' - replace given/when with classic if/else
...to save cpu cycles and let this
handle the database.
        - let the db take care of compression in raw queue
...into a ::common.pm class.
        - refactor common methods between db backends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant