Skip to content

Commit 2bcce1b

Browse files
authored
Merge pull request #240 from kevinbarbour/fix/spanner-shard-query
fix(repository): correct an issue with shard querying in spanner
2 parents 5a7a219 + 1b7da02 commit 2bcce1b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/shards/repository.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ func (r *spannerRepository) Lookup(shardKey string) (string, error) {
189189
return "", err
190190
}
191191

192-
return row.String(), nil
192+
var shardName string
193+
if err := row.ColumnByName("shard_name", &shardName); err != nil {
194+
return "", err
195+
}
196+
197+
return shardName, nil
193198
}
194199

195200
func (r *spannerRepository) List() ([]service.ShardMapping, error) {

0 commit comments

Comments
 (0)