Skip to content

Commit ad3669d

Browse files
authored
Update LiteCore to 3.2.0-148 (#524)
* Updated LiteCore to 3.2.0-148 * Generated replicator id as “CBL@<pointer address>”.
1 parent 3358d9d commit ad3669d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/CBLReplicator_Internal.hh

+11-2
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,27 @@ public:
215215
// Encode replicator options dict:
216216
alloc_slice options = encodeOptions();
217217
params.optionsDictFleece = options;
218+
219+
// Generate replicator id for logging purpose:
220+
std::stringstream ss;
221+
ss << "CBLRepl@" << (void*)this;
222+
auto replID = ss.str();
223+
_replicatorID = alloc_slice(replID);
218224

219225
// Create the LiteCore replicator:
220226
_db->useLocked([&](C4Database *c4db) {
221227
#ifdef COUCHBASE_ENTERPRISE
222228
if (_conf.endpoint->otherLocalDB()) {
223229
_c4repl = c4db->newLocalReplicator(_conf.endpoint->otherLocalDB()->useLocked().get(),
224-
params);
230+
params,
231+
_replicatorID);
225232
} else
226233
#endif
227234
{
228235
_c4repl = c4db->newReplicator(_conf.endpoint->remoteAddress(),
229236
_conf.endpoint->remoteDatabaseName(),
230-
params);
237+
params,
238+
_replicatorID);
231239
}
232240
});
233241

@@ -542,6 +550,7 @@ private:
542550
Retained<CBLDatabase> _db;
543551
Retained<CBLCollection> _defaultCollection;
544552
Retained<C4Replicator> _c4repl;
553+
alloc_slice _replicatorID;
545554
unique_ptr<CBLReplicatorStoppable> _stoppable;
546555
ReplicationCollectionsMap _collections; // For filters and conflict resolver
547556
bool _useInitialStatus; // For returning status before first start

vendor/couchbase-lite-core

Submodule couchbase-lite-core updated 278 files

0 commit comments

Comments
 (0)