Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Are filtered replication rules saved locally and run everytime in TouchDB-iOS without being explicitly invoked?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pulkit Singhal  
View profile  
 More options Nov 13 2012, 1:43 pm
From: Pulkit Singhal <pulkitsing...@gmail.com>
Date: Tue, 13 Nov 2012 10:43:28 -0800 (PST)
Local: Tues, Nov 13 2012 1:43 pm
Subject: Are filtered replication rules saved locally and run everytime in TouchDB-iOS without being explicitly invoked?

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 fine*
2012-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:passw...@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:passw...@couchdb.com./*old_db_name*/_changes?feed=longpoll&heartbeat=300000&style=a ll_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:passw...@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:passw...@couchdb.com./*new_db_name*/_changes?feed=longpoll&heartbeat=300000&style=a ll_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:passw...@couchdb.com/*old_db_name*/_local/ca8c016b72014ab703183af1f3be99d9bbc6e8e0]:
Got error Error Domain=NSURLErrorDomain
Code=-1001
"The request timed out."
UserInfo=0xac3350
{NSErrorFailingURLStringKey=https://username:passw...@couchdb.com/*
old_db_name*/_local/ca8c016b72014ab703183af1f3be99d9bbc6e8e0,
NSErrorFailingURLKey=https://username:passw...@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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jens Alfke  
View profile  
 More options Nov 13 2012, 7:39 pm
From: Jens Alfke <j...@couchbase.com>
Date: Tue, 13 Nov 2012 16:39:27 -0800
Local: Tues, Nov 13 2012 7:39 pm
Subject: Re: Are filtered replication rules saved locally and run everytime in TouchDB-iOS without being explicitly invoked?

On Nov 13, 2012, at 10:43 AM, Pulkit Singhal <pulkitsing...@gmail.com<mailto:pulkitsing...@gmail.com>> wrote:

Are filtered replication rules saved locally and run every time in TouchDB-iOS on launch without being explicitly invoked?

Persistent replications are, as the name implies, stored locally (in a special database named _replicator.) The info saved is the name of the local database, the URL of the remote db, flags like ‘continuous’, etc.

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:

How did you ‘change the name’ of the database? There’s no API for that :-/ If you went into the filesystem and renamed the database file, the replicator’s not going to know about that, so the replication document will still have the old name init.

—Jens


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pulkit Singhal  
View profile  
 More options Nov 14 2012, 7:21 pm
From: Pulkit Singhal <pulkitsing...@gmail.com>
Date: Wed, 14 Nov 2012 18:21:26 -0600
Local: Wed, Nov 14 2012 7:21 pm
Subject: Re: Are filtered replication rules saved locally and run everytime in TouchDB-iOS without being explicitly invoked?

> How did you ‘change the name’ of the database? There’s no API for that :-/
> If you went into the filesystem and renamed the database file, the
> replicator’s not going to know about that, so the replication document will
> still have the old name init.

I decided that for my test app I needed to separate out the data generated
while testing my DEBUG builds with developers and my ADHOC builds with beta
testers. So instead of using the standard db_name I added debug_db_name and
adhoc_db_name to my CouchDB and wired the test app's code to
select/initialize/replicate with the correct one based on #if DEBUG and #if
ADHOC flags for condinational compilation. I knew that this doesn't mean
that the db_name that was already present just evaporates ... but I simply
wasn't expecting it to try and replicate on its own, that's all.

Thanks for the info Jens :)
- Pulkit


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »