STAT-342 Work on fixing the sitestats deadlock.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/STAT-342@124019 66ffb92e-73f9-0310-93c1-f5514f145a0a
Moved to the correct location.


git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124020 66ffb92e-73f9-0310-93c1-f5514f145a0a
Ignore Eclipse files.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124021 66ffb92e-73f9-0310-93c1-f5514f145a0a
Move the XML files to the impl so we can have tests use them with out cross project dependencies.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124023 66ffb92e-73f9-0310-93c1-f5514f145a0a
Extract API call to see if event is a valid one.

This makes testing easier and creates cleaner seperation.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124024 66ffb92e-73f9-0310-93c1-f5514f145a0a
Add some performance testing.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124025 66ffb92e-73f9-0310-93c1-f5514f145a0a
Here we are optimistic about events already existing in the database.

This optimises for when rows already exist and pays the penalty of multiple SQL statements when it's the first time we see the event. It also stops the read, update save loop by doing the increment in the DB.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124026 66ffb92e-73f9-0310-93c1-f5514f145a0a
Make EventStat sortable.

This is so that all transactions insert events in the same order so deadlocks don't occur. If this works it should be done to other types being updated.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124030 66ffb92e-73f9-0310-93c1-f5514f145a0a
Make the other stats sortable.

This allows us to insert them in a standard order so we don't get deadlocks.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124053 66ffb92e-73f9-0310-93c1-f5514f145a0a
Use a database connection pool when running tests so we push MySQL with statements rather than it's connection handling code.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124054 66ffb92e-73f9-0310-93c1-f5514f145a0a
Update to a newer MySQL connector.

The older connector was throwing exceptions under some conditions.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124056 66ffb92e-73f9-0310-93c1-f5514f145a0a
Made some more sortable so insertion order is set.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124058 66ffb92e-73f9-0310-93c1-f5514f145a0a
Added a mock site so all site lookups return something other than null.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124065 66ffb92e-73f9-0310-93c1-f5514f145a0a
Revert back to using the read-increment-update alg.

I think this drops events, but that's best fixes in another Jira.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/branches/STAT-342@124071 66ffb92e-73f9-0310-93c1-f5514f145a0a
STAT-342 Sort the updates so we don't deadlock.

When doing live inserts into the sitestats tables using the collect thread busy sites can end up with deadlocks because different nodes attempt to update the same sites in different orders. This sorts all updated before doing them so that all nodes insert into the same rows in the same order.

git-svn-id: https://source.sakaiproject.org/svn/sitestats/trunk@133719 66ffb92e-73f9-0310-93c1-f5514f145a0a