Skip to content

Commit

Permalink
gemini: attempt mutation on both systems
Browse files Browse the repository at this point in the history
EVen if mutation on the test system fails we now try to perform
the same mutation on the oracle as well.
  • Loading branch information
Henrik Johansson committed May 16, 2019
1 parent f4bf3f1 commit c53fdca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Unreleased

- Gemini now tries to perform mutation on both systems regardless of
if one of them fail.

## [1.0.1] - 2019-05-16

- Gemini ensures that primary key buckets do not overflow int32.
Expand Down
8 changes: 4 additions & 4 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ func (s *Session) Close() {
s.oracleSession.Close()
}

func (s *Session) Mutate(query string, values ...interface{}) error {
func (s *Session) Mutate(query string, values ...interface{}) (e error) {
if err := s.testSession.Query(query, values...).Exec(); err != nil {
return fmt.Errorf("%v [cluster = test, query = '%s']", err, query)
e = multierr.Append(e, fmt.Errorf("%v [cluster = test, query = '%s']", err, query))
}
if err := s.oracleSession.Query(query, values...).Exec(); err != nil {
return fmt.Errorf("%v [cluster = oracle, query = '%s']", err, query)
e = multierr.Append(e, fmt.Errorf("%v [cluster = oracle, query = '%s']", err, query))
}
return nil
return
}

func (s *Session) Check(table Table, query string, values ...interface{}) (err error) {
Expand Down

0 comments on commit c53fdca

Please sign in to comment.