Syncing buckets -


#1

Continuing the discussion from Synchronizing buckets:
Could anyone help from the mobile side?


#2

@HandeBc

Can you provide Sync Gateway logs covering the period where you are updating documents in the source bucket.

If you set full logging "log":["*"] and rerun your test this should allow us to figure out what the issue is.


#3

@andy

Hi,
I synced my docs to the sync_gateway bucket with this config :

{
  "interface":":4984",       
  "adminInterface":":4985",
  "log":["CRUD+", "REST+", "Changes+", "Attach+", "Shadow"],
  "databases":{              
    "sync_gateway":{
        "server":"http://host:8091",
        "bucket":"sync_gateway",
        "sync":`
                function (doc) {
                channel (doc.channels);
            }`,
        "users": {
                "GUEST": {
                    "disabled": false,
                    "admin_channels": ["*"]
                }
            },
        "shadow": {
                "server": "http://host:8091",
                "bucket": "default"
        }
    }
  }
}

But after that when I changed something in default bucket I didn’t see that change in sync_gateway bucket. But I guess it is because I closed command prompt(also, the sync_gateway) after I carried those docs? could it be?


#4

@HandeBc

Sync Gateway is responsible for syncing between the source and shadow bucket, so the process must be running for the document changes to appear, once the changes have been sync’d they are persistent.


#5

@andy Yeah, turns out my problem was not a problem at all. I just need to keep sync_gateway working in background. Thanks.