New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adding new columns instead of updating them if one of the key values is a NULL in upserts. #4369

Merged
merged 6 commits into from Jan 9, 2019

Conversation

3 participants
@hawkowl
Copy link
Contributor

hawkowl commented Jan 9, 2019

No description provided.

@hawkowl hawkowl requested a review from matrix-org/synapse-core Jan 9, 2019

Show resolved Hide resolved synapse/storage/_base.py Outdated

hawkowl added some commits Jan 9, 2019

Show resolved Hide resolved synapse/storage/_base.py Outdated
@@ -547,11 +547,19 @@ def _simple_upsert_txn(self, txn, table, keyvalues, values, insertion_values={},
if lock:
self.database_engine.lock_table(txn, table)

def _getwhere(val):

This comment has been minimized.

@richvdh

richvdh Jan 9, 2019

Member

given that val is a key as opposed to a value, could it be called key ?

hawkowl added some commits Jan 9, 2019

@richvdh

richvdh approved these changes Jan 9, 2019

Copy link
Member

richvdh left a comment

\o/ lgtm, assuming the CI passes

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 9, 2019

Codecov Report

Merging #4369 into develop will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4369      +/-   ##
===========================================
+ Coverage    73.68%   73.69%   +<.01%     
===========================================
  Files          300      300              
  Lines        29815    29815              
  Branches      4895     4895              
===========================================
+ Hits         21970    21971       +1     
  Misses        6407     6407              
+ Partials      1438     1437       -1
Impacted Files Coverage Δ
synapse/util/file_consumer.py 82.45% <0%> (+1.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1d81d0...4ebf1dd. Read the comment docs.

@hawkowl hawkowl merged commit 7960c26 into develop Jan 9, 2019

5 checks passed

ci/circleci: sytestpy2merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy2postgresmerged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3merged Your tests passed on CircleCI!
Details
ci/circleci: sytestpy3postgresmerged Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Superceded by https://github.com/orgs/matrix-org/projects/8 automation moved this from Review to Done - Operations Jan 9, 2019

@hawkowl hawkowl deleted the hawkowl/nulls-in-upsert branch Jan 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment