Author: svn-role
Date: Thu Apr 17 07:46:34 2014
New Revision: 1588149
URL: http://svn.apache.org/r1588149
Log:
Merge the r1570642 group from trunk, with --accept=working:
* r1570642, r1585686, r1586352
Fix memcached support.
Justification:
Enabling memcached causes crashes without these fixes.
Regression from 1.7.
Notes:
Merge with --accept=working to resolve FSX conflict.
Votes:
+1: stsp, philip, julianfoad
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/include/private/svn_cache.h
subversion/branches/1.8.x/subversion/libsvn_fs_fs/fs.h
subversion/branches/1.8.x/subversion/libsvn_subr/cache-memcache.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1570642,1585686,1586352
Modified: subversion/branches/1.8.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1588149&r1=1588148&r2=1588149&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Apr 17 07:46:34 2014
@@ -366,12 +366,3 @@ Approved changes:
Branch:
^/subversion/branches/1.8.x-javahl-exception-crash
Votes:
- +1: brane, rhuijben
-
- * r1586052, r1586467
- Fix two memory lifetime bugs in the Ruby bindings.
- Justification:
- Ruby bindings tests crash with APR pool debugging enabled.
- Votes:
- +1: stsp
- +0: rhuijben (Looks good. Can't test)
Modified: subversion/branches/1.8.x/subversion/include/private/svn_cache.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/include/private/svn_cache.h?rev=1588149&r1=1588148&r2=1588149&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/include/private/svn_cache.h (original)
+++ subversion/branches/1.8.x/subversion/include/private/svn_cache.h Thu Apr 17
07:46:34 2014
@@ -182,6 +182,10 @@ typedef struct svn_cache__info_t
* if they are strings. Cached values will be copied in and out of
* the cache using @a serialize_func and @a deserialize_func, respectively.
*
+ * If @a deserialize_func is NULL, then the data is returned as an
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
+ * assumed to be an svn_stringbuf_t.
+ *
* The cache stores up to @a pages * @a items_per_page items at a
* time. The exact cache invalidation strategy is not defined here,
* but in general, a lower value for @a items_per_page means more
@@ -224,7 +228,7 @@ svn_cache__create_inprocess(svn_cache__t
* other caches. @a *cache_p will be allocated in @a result_pool.
*
* If @a deserialize_func is NULL, then the data is returned as an
- * svn_string_t; if @a serialize_func is NULL, then the data is
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
* assumed to be an svn_stringbuf_t.
*
* These caches are always thread safe.
@@ -309,7 +313,7 @@ svn_cache__membuffer_cache_create(svn_me
* this cache from other caches. @a *cache_p will be allocated in @a
result_pool.
*
* If @a deserialize_func is NULL, then the data is returned as an
- * svn_string_t; if @a serialize_func is NULL, then the data is
+ * svn_stringbuf_t; if @a serialize_func is NULL, then the data is
* assumed to be an svn_stringbuf_t.
*
* If @a thread_safe is true, and APR is compiled with threads, all
Modified: subversion/branches/1.8.x/subversion/libsvn_fs_fs/fs.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_fs_fs/fs.h?rev=1588149&r1=1588148&r2=1588149&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/1.8.x/subversion/libsvn_fs_fs/fs.h Thu Apr 17 07:46:34
2014
@@ -266,7 +266,7 @@ typedef struct fs_fs_data_t
svn_cache__t *dir_cache;
/* Fulltext cache; currently only used with memcached. Maps from
- rep key (revision/offset) to svn_string_t. */
+ rep key (revision/offset) to svn_stringbuf_t. */
svn_cache__t *fulltext_cache;
/* Access object to the atomics namespace used by revprop caching.
Modified: subversion/branches/1.8.x/subversion/libsvn_subr/cache-memcache.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_subr/cache-memcache.c?rev=1588149&r1=1588148&r2=1588149&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_subr/cache-memcache.c Thu Apr
17 07:46:34 2014
@@ -203,9 +203,10 @@ memcache_get(void **value_p,
}
else
{
- svn_string_t *value = apr_pcalloc(result_pool, sizeof(*value));
+ svn_stringbuf_t *value = svn_stringbuf_create_empty(result_pool);
value->data = data;
- value->len = data_len;
+ value->blocksize = data_len;
+ value->len = data_len - 1; /* account for trailing NUL */
*value_p = value;
}
}
@@ -263,7 +264,7 @@ memcache_set(void *cache_void,
{
svn_stringbuf_t *value_str = value;
data = value_str->data;
- data_len = value_str->len;
+ data_len = value_str->len + 1; /* copy trailing NUL */
}
err = memcache_internal_set(cache_void, key, data, data_len, subpool);