Hello Jens,
Are filtered replication rules saved locally and run every time in TouchDB-iOS on launch without being explicitly invoked?
I ask because I changed the name of the database both locally and remotely in my test app but the older database still showed up in the logs attempting to replicate:
// the following log starts out fine2012-11-13 12:17:21.531 [3489:707] Creating database...
2012-11-13 12:17:22.155 [3489:707] ...Created CouchDatabase at <touchdb:///
new_db_name>
// then the it becomes troubling because I'm NOT invoking the creation or replication on the local old_db_name anymore:12:17:37.541| ChangeTracker: TDConnectionChangeTracker[0xaeafa0
old_db_name]: Started...
<https://username:pass...@couchdb.com./
old_db_name/_changes?feed=normal&heartbeat=300000&style=all_docs&since=5744&limit=100&filter=default/myFilter>
12:17:53.472| ChangeTracker: TDConnectionChangeTracker[0xaeafa0
old_db_name]: Started...
<https://username:pass...@couchdb.com./
old_db_name/_changes?feed=longpoll&heartbeat=300000&style=all_docs&since=5744&limit=100&filter=default/myFilter>
2012-11-13 12:17:53.478 [3489:4803] CouchTouchDBServer[touchdb:///]: Replication progress changed
2012-11-13 12:17:54.750 [3489:707] CouchPersistentReplication[DF10..937B] = (null)
2012-11-13 12:17:54.755 [3489:707] CouchPersistentReplication[04AC..91D3] = (null)
2012-11-13 12:17:54.837 [3489:707] >>>>>> 1 docs being updated
2012-11-13 12:17:55.008 [3489:707] >>>>>> 2 docs being updated
2012-11-13 12:17:55.039 [3489:707] CouchLiveQuery: ...Finished (status=200)
2012-11-13 12:17:55.041 [3489:707] CouchLiveQuery: ...Rows changed! (now 0)
2012-11-13 12:17:55.046 [3489:707] <<<<<< 1 docs being updated
// then the logs go back to stuff that makes sense to me again with the use of new_db_name:12:17:55.359| ChangeTracker: TDConnectionChangeTracker[0xe88a8e0
new_db_name]: Started...
<https://username:pass...@couchdb.com./
new_db_name/_changes?feed=normal&heartbeat=300000&style=all_docs&limit=100&filter=default/clientFilter>
12:17:55.747| ChangeTracker: TDConnectionChangeTracker[0xe88a8e0
new_db_name]: Got response, status 200
12:17:55.748| ChangeTracker: TDConnectionChangeTracker[0xe88a8e0
new_db_name]: Got entire body, 519 bytes
12:17:55.753| ChangeTracker: TDConnectionChangeTracker[0xe88a8e0
new_db_name]: Started...
<https://username:pass...@couchdb.com./
new_db_name/_changes?feed=longpoll&heartbeat=300000&style=all_docs&since=7&limit=100&filter=default/clientFilter>
2012-11-13 12:17:55.759 [3489:4803] CouchTouchDBServer[touchdb:///]: Replication progress changed
2012-11-13 12:17:57.545 [3489:707] **** CHANGE #1: CouchDocument[org...list] (null) -> 1-a4bc57ce5f81412e3332e14eccdd70a1
2012-11-13 12:17:57.559 [3489:707] **** CHANGE #2: CouchDocument[org...stry] (null) -> 1-398151a37daf892abab50f7f32671e6a
2012-11-13 12:17:57.567 [3489:707] **** CHANGE #3: CouchDocument[20d0..316f] (null) -> 1-8359ef1157849d18dba30504383142fe
2012-11-13 12:17:57.579 [3489:707] **** CHANGE #4: CouchDocument[20d0..3442] (null) -> 1-fc681b6bdcce75cc55f390191eb7ce74
2012-11-13 12:17:57.581 [3489:707] CouchDatabase: External change with seq=4
// and then they go back to confusing again with the use of old_db_name:12:18:32.257| TDRemoteJSONRequest
[GET
https://username:pass...@couchdb.com/old_db_name/_local/ca8c016b72014ab703183af1f3be99d9bbc6e8e0]:
Got error Error Domain=NSURLErrorDomain
Code=-1001
"The request timed out."
UserInfo=0xac3350 {NSErrorFailingURLStringKey=
https://username:pass...@couchdb.com/old_db_name/_local/ca8c016b72014ab703183af1f3be99d9bbc6e8e0, NSErrorFailingURLKey=
https://username:pass...@couchdb.com/old_db_name/_local/ca8c016b72014ab703183af1f3be99d9bbc6e8e0,
NSLocalizedDescription=The request timed out.,
NSUnderlyingError=0xe9925f0 "The request timed out."}
Is this all standard procedure?
If so, then how can I prevent an existing DB from replicating if I didn't invoke it explicitly on my test app's startup?
Thanks!
- Pulkit