Skip to content

[stable8] don't update identical values - #15974

Merged
PVince81 merged 2 commits into
stable8from
backport-15549
May 15, 2015
Merged

PVince81 merged 2 commits into
stable8from
backport-15549

Conversation

@MorrisJobke

Copy link
Copy Markdown
Contributor

The UPDATE oc_filecache statement blindly overwrites identical data.
Databases like Postgres that create a new row on an update
and mark the old one as dead will suffer from the previous
behaviour, as millions of "new" rows are created in the database.

This patch changes the WHERE clause to test for identical
values and not updating if the values in the DB are identical
to the ones being passed.
@MorrisJobke MorrisJobke added this to the 8.0.4-current-maintenance milestone Apr 30, 2015
@MorrisJobke MorrisJobke changed the title don't update identical values [stable8] don't update identical values Apr 30, 2015
@karlitschek

Copy link
Copy Markdown
Contributor

👍

@ghost

ghost commented May 1, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/12105/
🚀 Test PASSed.🚀
chuck

@PVince81

Copy link
Copy Markdown
Contributor

A unit test would have been nice, but as we cannot mock the database part we cannot count how many updates have been done.

Anyway, looks good 👍

PVince81 pushed a commit that referenced this pull request May 15, 2015
[stable8] don't update identical values
@PVince81
PVince81 merged commit 1d35c01 into stable8 May 15, 2015
@PVince81
PVince81 deleted the backport-15549 branch May 15, 2015 16:22
@rperezb

rperezb commented May 28, 2015

Copy link
Copy Markdown

Checked by @SergioBertolinSG

@jvillafanez

Copy link
Copy Markdown
Member

Checking data from OC 8.0.3:

screenshot from 2015-05-29 14 22 37

Data from OC 8.0.4 (?) - current stable8:

screenshot from 2015-05-29 14 22 10

Same test, Same environment. Looks like there is some improvement

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants