Skip to content

Commit

Permalink
Return an error if the storage engine can't be created
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshahid committed Sep 22, 2014
1 parent 20deef8 commit 78f8c39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datastore/shard_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ func (self *ShardDatastore) GetOrCreateShard(id uint32) (cluster.LocalShardDb, e
}

se, err := init.Initialize(dbDir, c)
if err != nil {
return nil, err
}

db, err = NewShard(se, self.pointBatchSize, self.writeBatchSize, self.metaStore)
if err != nil {
log.Error("Error creating shard: ", err)
Expand Down

0 comments on commit 78f8c39

Please sign in to comment.