Summary:
There's no point passing it by reference since callers don't need to
retain it, and the async implementation needs to move it into another context.
Reviewed By: farnz
Differential Revision: D7350001
fbshipit-source-id: 5947557a84621afae801dc20e3994496244e3a10
Summary:
Use connection pooling for mysql. We can't use it for sqlite because each
"connection" ends up being to a separate db.
Reviewed By: sid0
Differential Revision: D7350000
fbshipit-source-id: 37be71b863810c48ae69da579cf74358058f7d2f
Summary:
For testing, I want to be able to persist state in SQLite (so that
when we have in-process caching, I can restart and see cold cache behaviour).
This means that I want to open a database, and create the tables ignoring
failures. Make it possible
Reviewed By: StanislavGlebik
Differential Revision: D7353231
fbshipit-source-id: 0d0926c501e7951dfaf82998ed58d152e80ace7e
Summary: the diesel schemas should prevent from reading a manifest hash as changeset and vice versa
Reviewed By: StanislavGlebik
Differential Revision: D7339725
fbshipit-source-id: c619ab7ecabfd10f42e64a38c0f16abd114d4a31
Summary:
Mononoke will introduce its own ChangesetId, ManifestId and BlobHash, and it
would be good to rename these before that lands.
Reviewed By: farnz
Differential Revision: D7293334
fbshipit-source-id: 7d9d5ddf1f1f45ad45f04194e4811b0f6decb3b0
Summary: Add in the missing code to establish a MySQL connection to the `changesets` crate. Also add unit tests for `MysqlChangesets`.
Reviewed By: jsgf
Differential Revision: D7174371
fbshipit-source-id: b531c5d5efb95eeb5e39188c4d608540f0c0261f
Summary:
Diesel looks quite promising overall, as long as we can ensure async operations
work.
Some basic notes:
* This just looks async but isn't really -- doing that would need a way to send
queries over to a thread pool. (cc kulshrax)
* It is unfortunate that we must use a macro for the exact same `add` code across
MySQL and SQLite. There doesn't appear to be a way out though -- there is no
trait bound that we can apply to the `add` method here.
This is currently pretend-async -- it would be good to make this really async, but that should wait for a future diff IMO
Reviewed By: StanislavGlebik
Differential Revision: D6932028
fbshipit-source-id: ac1cfde3b96bb790f00b73d49c6d90ed128f0255