Commit Graph

22 Commits

Author SHA1 Message Date
Brad Fitzpatrick d1fea28536 sorted/mysql: cap number of queries to 20 at a time
Arbitrary limit, but prevents things from exploding during request spikes.

Fixes camlistore/camlistore#683

Change-Id: I3699d25416fb6bbc1ea4f3b984b0ce05e6abf31b
2016-02-13 13:21:00 -08:00
mpl c88d81a2fd sorted/mysql: remove DB from pool when closing
Otherwise when openOrCachedDB is called for the second time,
it would return an actually closed DB.

Change-Id: I820834e508fed1a34ab7bd19a8a91e398badff9c
2016-01-06 20:42:52 +01:00
mpl 40be4d8da2 vendor: go4.org/jsonconfig (and errorutil)
Previously pkg/jsonconfig and pkg/errorutil

Copied from go4.org at rev d1b8a2fb2de6160036e4801aa5e4d855571078b8

Change-Id: I673ed55b0825baa2607289b6082f205100261d7a
2015-12-01 17:21:49 +01:00
Brad Fitzpatrick 6f58fc2426 Fix build, move more stuff from third_party to vendor. 2015-08-18 10:19:49 +02:00
Brad Fitzpatrick 06f7accf31 Require Go 1.5 (due out soon), start move from third_party to vendor.
See https://golang.org/s/go15vendor

This commit moves the google.golang.org/cloud/... packages. The rest
of third_party will move later.

This commit is a dependency for some cloud logging work which we'll
develop in Camlistore's tree.
2015-08-15 22:45:11 +02:00
Brad Fitzpatrick af36d78bd7 env: add IsDev and use it everywhere
Change-Id: I5547ce989c05f1f48774f24abee41c489326baa0
2015-04-02 05:55:01 -07:00
Brad Fitzpatrick c9a0beae45 Add new 'env' package to detect the type of environment.
Also, delete my old gce package from third_party and only use the
google metadata package (which my gce package became, and which was
also already vendored into third_party)

Fixes #596

Change-Id: I64fd6f1e9dc6f433466f91f81efd2ecbf039334f
2015-04-01 08:45:36 -07:00
mpl 36dd866f36 Merge "pkg/sorted: define (larger) values for key and value sizes" 2015-01-26 19:05:22 +00:00
mpl ae38f657b8 pkg/sorted: define (larger) values for key and value sizes
Issue #429

Change-Id: Id8205ca1581c1f21b3983e13d8c3f61293868529
2015-01-26 19:39:41 +01:00
Brad Fitzpatrick aada432c52 third_party: add oauth2/google, google.golang.org/cloud, google.golang.org/api
oauth2 at 267028f9bc2a1177dc5769be38c68c1b4fbe91c4
google cloud at 2e43671e4ad874a7bca65746ff3edb38e6e93762
google api at fc402b0d6f2a46ba7dcf0a4606031f45fb82a728
  (partial commit only, since it's 16+ MB)

And update all callers from the old
code.google.com/p/google-api-go-client over to google.golang.org/api.

Change-Id: Ide190e04bb863928f98369a7c4d2b8c19fda1f66
2015-01-22 15:10:36 -08:00
mpl df7952b9ba mysql: create database now distinct from create tables
Because we do not want the database name to be optional with a
placeholder (/*DB*/) in the statement that creates the database, since
it is not actually optional there - as opposed to when creating tables.

Change-Id: I05351d76d95071492d763758a11454f219524510
2014-08-08 20:06:02 +02:00
Brad Fitzpatrick 031c6199da sorted/mysql: automatically find IPs of hosts named *.cloudsql.google.internal
Change-Id: Ib03add64c2c6b4de7fc6059f2a9c22065e2b2e7d
2014-08-06 17:28:55 -07:00
Brad Fitzpatrick ac5c2fd045 sorted/mysql: create the db too if it doesn't exist.
Change-Id: I566d49052057848e9d4af0f01243a89db367e20a
2014-08-06 17:21:42 -07:00
Brad Fitzpatrick 6513d525c6 sorted/mysql: don't put database name in the DSN, share connections
Change-Id: Ia4d399e72a1290f68dc2b0de71945176c6aac482
2014-08-06 16:15:08 -07:00
Brad Fitzpatrick b65868d754 serverinit: allow specifying port numbers in user@server:port:pass
With heuristics and tests.

Change-Id: Ifacfc725db15100c447a3251c23267a5bfd313cf
2014-08-06 15:07:43 -07:00
mpl 45ce6cfdd3 mysql: replace mymysql with go-sql-driver
from github.com/go-sql-driver/mysql at 9a7aa3606b82e2081a13a008ada88dfdb96c20fd

Context: http://camlistore.org/issue/428

Change-Id: Ia93ac35da02933bd03d2c6b7b8e5e549ba0472cb
2014-05-01 17:42:51 +02:00
mpl a9db189cd7 docker tests: remove container when done
http://camlistore.org/issue/421

Change-Id: Iefde3a8235db0103e8fcfac51f5dfcce5df73ef6
2014-04-09 23:26:14 +02:00
mpl 899acb8e72 pkg/sorted: remove API for each distinct implementation
Change-Id: I42446683189cdb00dcfbec1f221885092fdd83d6
2014-04-08 01:37:08 +02:00
mpl b0c4f85ee0 sorted/postgres: test with docker
Also, NewKeyValue now automatically creates the required tables.

http://camlistore.org/issue/263

Change-Id: I02dd7660ee08c2eaeec17131622d6f581fdd6c55
2014-03-28 19:34:09 +01:00
mpl 08f9c821f5 sorted,dockertest: added MySQL (dockerified) test
Two important related changes:

1) sorted/mysql now takes into account the host given in the config
2) the required tables are now automatically created by NewKeyValue

http://camlistore.org/issue/263

Change-Id: I0043f36edb0630d6484148508d3a1e08c8e88a94
2014-03-26 00:39:38 +01:00
mpl 8fec95752c pkg/index: move postgresql to sorted + some fixes
Change-Id: Ia6410256ffe8d4cbc2b9a5c056d075707105ab08
2013-12-24 00:37:14 +01:00
mpl 62f8a252ff pkg/index: move mysql to sorted
also minor cleanups in sqlite and mongo

Change-Id: I1f371358997d929c72a8f63d2630a1c3fa4a0240
2013-12-18 20:18:20 +01:00