question

ccclouddev avatar image
ccclouddev asked

Change api not gave a complete change list

Hi,

I have encounter some weird behaviour from cloud. I use change api to get cloud's change then I can sync those updated files only.

Here is my scenario 1. Upload files to drive 2. Start my app to download files from cloud. (checkpoint = CPLzhtjkKhoSCAIaDgEUAAAAAVRQUVFVFRUU) 3. Once download finished, upload some jpg from my cellphone 4. Start my app while files uploaded. (checkpoint = CPiQpdjkKhoSCAIaDgEUAAAAAaIqqqIqqiKq)

In my case, if I upload 5 files (those name with 1,2,3,4,5) at step 1 and upload 5 more (named 6,7,8,9,10), the first checkpoint should return 1,2,3,4,5 and second one is 6,7,8,9,10.

But sometimes I get weird result from api, change with second checkpoint only gives 7,8,9,10. 6 is missing, At that moment,if I ask change with first checkpoint the result is 1,2,3,4,5,6. (early result is 1,2,3,4,5.)

What's the reason of the file is append to early checkpoint? Make no sense, please give a look about this issue, thanks.

amazon driveapisync
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image Jamie Grossman ♦♦ commented ·

Hi there,

Thanks for your patience.

Currently investigating this issue and will get back to you as soon as I have more on the matter.

Thanks!

Jamie

0 Likes 0 ·
geekgirl avatar image
geekgirl answered

Hi ccclouddev, this is expected behavior. The results are still in order, but there is no guarantee that the history will be clustered in the same sets that were uploaded in.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ccclouddev avatar image ccclouddev commented ·

Thanks for your reply.

Why you said that is an expected behaviour? How can I know that I have a new event in early checkpoint? I mean, our app always follow the next checkpoint which feedback from amazondrive to fetch new events. if I make some operation on cloud, i'm looking forward to get those events from my current checkpoint instead early one.

0 Likes 0 ·
paulchu avatar image
paulchu answered

It is okay that the history is not clustered in the same sets. The problem is that events could be lost forever without being aware by our client application if we use subsequent checkpoints to retrieve the events. This is a serious problem, because files in the cloud drive won't be sync to the the local drive, and there is no way to know which files are missed.

But getchange is supposed to eventually have all events returned reliably. This breaks your spec "the contract of the API guarantees that all updates that have occurred since the specified checkpoint will be returned" as stated here: https://developer.amazon.com/public/apis/experience/cloud-drive/content/changes.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image Jamie Grossman ♦♦ commented ·

Hi there,

Thanks for the patience.

Is it possible to get the output stream of the getChanges call? As well as which files were uploaded. You could use tempLink to represent those uploaded files.

Jamie

0 Likes 0 ·