You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2020/04/08 04:00:27 UTC
svn commit: r1876262 - in /subversion/branches/1.14.x: ./ STATUS
subversion/libsvn_fs_fs/rep-cache-db.sql subversion/libsvn_fs_fs/rep-cache.c
Author: svn-role
Date: Wed Apr 8 04:00:26 2020
New Revision: 1876262
URL: http://svn.apache.org/viewvc?rev=1876262&view=rev
Log:
Merge r1875918 from trunk:
* r1875918
rep-cache.db insert optimization
Justification:
Small performance optimization.
Votes:
+1: stsp, cmpilato, jamessan
Modified:
subversion/branches/1.14.x/ (props changed)
subversion/branches/1.14.x/STATUS
subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache-db.sql
subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache.c
Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1875918
Modified: subversion/branches/1.14.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1876262&r1=1876261&r2=1876262&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Wed Apr 8 04:00:26 2020
@@ -21,13 +21,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1875918
- rep-cache.db insert optimization
- Justification:
- Small performance optimization.
- Votes:
- +1: stsp, cmpilato, jamessan
-
* r1875921, r1875925, r1875973, r1876010
Introduce 'svnadmin build-repcache' command.
Justification:
Modified: subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache-db.sql
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache-db.sql?rev=1876262&r1=1876261&r2=1876262&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache-db.sql (original)
+++ subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache-db.sql Wed Apr 8 04:00:26 2020
@@ -61,7 +61,7 @@ WHERE hash = ?1
-- STMT_SET_REP
/* Works for both V1 and V2 schemas. */
-INSERT OR FAIL INTO rep_cache (hash, revision, offset, size, expanded_size)
+INSERT OR IGNORE INTO rep_cache (hash, revision, offset, size, expanded_size)
VALUES (?1, ?2, ?3, ?4, ?5)
-- STMT_GET_REPS_FOR_RANGE
Modified: subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache.c?rev=1876262&r1=1876261&r2=1876262&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/1.14.x/subversion/libsvn_fs_fs/rep-cache.c Wed Apr 8 04:00:26 2020
@@ -328,7 +328,6 @@ svn_fs_fs__set_rep_reference(svn_fs_t *f
{
fs_fs_data_t *ffd = fs->fsap_data;
svn_sqlite__stmt_t *stmt;
- svn_error_t *err;
svn_checksum_t checksum;
checksum.kind = svn_checksum_sha1;
checksum.digest = rep->sha1_digest;
@@ -351,28 +350,7 @@ svn_fs_fs__set_rep_reference(svn_fs_t *f
(apr_int64_t) rep->size,
(apr_int64_t) rep->expanded_size));
- err = svn_sqlite__insert(NULL, stmt);
- if (err)
- {
- representation_t *old_rep;
-
- if (err->apr_err != SVN_ERR_SQLITE_CONSTRAINT)
- return svn_error_trace(err);
-
- svn_error_clear(err);
-
- /* Constraint failed so the mapping for SHA1_CHECKSUM->REP
- should exist. If so that's cool -- just do nothing. If not,
- that's a red flag! */
- SVN_ERR(svn_fs_fs__get_rep_reference(&old_rep, fs, &checksum, pool));
-
- if (!old_rep)
- {
- /* Something really odd at this point, we failed to insert the
- checksum AND failed to read an existing checksum. Do we need
- to flag this? */
- }
- }
+ SVN_ERR(svn_sqlite__insert(NULL, stmt));
return SVN_NO_ERROR;
}