From 043a1633bb6b9b1268990a8f603865f543a98e16 Mon Sep 17 00:00:00 2001 From: Sugu Sougoumarane Date: Fri, 19 Jul 2013 15:17:50 -0700 Subject: [PATCH 1/2] bug fix: Use cachePool.IsClosed to check if rowcache is enabled --- go/vt/tabletserver/cache_pool.go | 4 ++-- go/vt/tabletserver/schema_info.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/vt/tabletserver/cache_pool.go b/go/vt/tabletserver/cache_pool.go index 54edaeebc6e..08e47873b55 100644 --- a/go/vt/tabletserver/cache_pool.go +++ b/go/vt/tabletserver/cache_pool.go @@ -142,10 +142,10 @@ func (cache *Cache) Recycle() { func CacheCreator(dbconfig dbconfigs.DBConfig) CreateCacheFunc { if dbconfig.Memcache == "" { - relog.Info("Row cache not enabled") + relog.Info("rowcache not enabled") return nil } - relog.Info("Row cache is enabled") + relog.Info("rowcache is enabled") return func() (*memcache.Connection, error) { return memcache.Connect(dbconfig.Memcache) } diff --git a/go/vt/tabletserver/schema_info.go b/go/vt/tabletserver/schema_info.go index c10ecd514dc..d7db8b6e071 100644 --- a/go/vt/tabletserver/schema_info.go +++ b/go/vt/tabletserver/schema_info.go @@ -171,7 +171,7 @@ func (si *SchemaInfo) override(schemaOverrides []SchemaOverride) { continue } } - if si.cachePool == nil || override.Cache == nil { + if si.cachePool.IsClosed() || override.Cache == nil { continue } switch override.Cache.Type { From 5b149ffab1b85eb6f61df93097dafe46bf8af9e8 Mon Sep 17 00:00:00 2001 From: Sugu Sougoumarane Date: Fri, 19 Jul 2013 15:27:55 -0700 Subject: [PATCH 2/2] Fix .gitignore for vim and go --- .gitignore | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 4b8061a809a..d0162c76823 100644 --- a/.gitignore +++ b/.gitignore @@ -12,20 +12,12 @@ _test *.[568vq] [568vq].out -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - build dist *.out *.output -.swp +*.swp .DS_Store third_party/mysql