It’s not a problem to reuse the same view, that is encouraged actually.
Yes revisions are important for replication. That’s why the try catch block only checks for a certain kind of exception and throws all the rest up the stack. The exception it catches has no effect because it means that revision already exists and so it has already been, or will be replicated.
Sorry, What my question really should be:
Does the Duplication Revision
check actually checks if the incoming revision was exactly the same as the one
that is already exist in db? Not just an ID constrain check, right?
I replied to your latest post, not sure why the forum keep putting my post on top of the one I replied to…
Two identical revisions will have two identical revision IDs, so there is no need to check the entire contents. Don’t worry about the post order. It seems like some sort of problem with our forum provider (the same thing was happening to me). In the end, the post will show up in the correct order.
Great! Thanks for that. I will keep you updated with the testing. Do I need to make sure CouchbaseLiteTcpListener
is a singleton in my application? I would like to shut the listener down gracefully when the web application is restarted or shutdown so it will free the port the listener is bind to.
No, not particularly. Just make sure you aren’t starting several of them at the same time. Calling stop will shut down the listener and free up the port. The forum is starting to get unhappy with the length of this thread, so if you could start a new one if you run into other troubles that would be helpful.