简体   繁体   English

Azure At Offline Offline Sync Updated At在增量同步期间提取整个数据

[英]Azure Offline Sync Updated At pulls whole data during the Incremental Sync

I have a table controller, which has one way sync (Only get since there is no any update from mobile). 我有一个表控制器,它有一种同步方式(只有从移动设备没有任何更新时才能获取)。 So the very first time when I do the PullAsync it has pulled whole data since my Update At filed has the same timestamp for all the records. 因此,当我第一次执行PullAsync时,它已经提取了全部数据,因为我的Update At字段对所有记录都具有相同的时间戳。 Now Second time I just wanted to do the incremental Pull (Note I do pass a name value to PullAsync to enable incremental sync). 现在第二次,我只想执行增量Pull(请注意,我确实将名称值传递给PullAsync以启用增量同步)。

But the problem is, it retrieves whole data again since there is no updated time stamp in Updated At (Because there is no update method in the Table Controller since it is one-way sync-Azure to mobile). 但是问题是,由于在Update At中没有更新的时间戳,因此它再次检索了全部数据(因为Table Controller中没有更新方法,因为它是与移动设备的单向同步,因此无法使用)。 How can I omit pulling data again if there is no update while all the Update At values are same time stamp? 如果所有“更新时间”值都为相同的时间戳,而没有更新,我该如何省略再次提取数据? The issue is same as mentioned in below link. 问题与以下链接中提到的相同。 Do we still need to do one record update in order to fix this? 为了解决此问题,我们是否仍需要更新一条记录?

https://social.msdn.microsoft.com/Forums/office/en-US/ff002e85-1313-449f-89eb-cd45c1a4846c/mobile-services-sync-pullasync-and-updatedat?forum=azuremobile https://social.msdn.microsoft.com/Forums/office/zh-CN/ff002e85-1313-449f-89eb-cd45c1a4846c/mobile-services-sync-pullasync-and-updatedat?forum=azuremobile

Thanks in Advance 提前致谢

How can I omit pulling data again if there is no update while all the Update At values are same time stamp? 如果所有“更新时间”值都为相同的时间戳,而没有更新,我该如何省略再次提取数据? The issue is same as mentioned in below link. 问题与以下链接中提到的相同。 Do we still need to do one record update in order to fix this? 为了解决此问题,我们是否仍需要更新一条记录?

I have checked that this issue still exists. 我已经检查过此问题仍然存在。 AFAIK, the PullAsync operation would pull 50 records (MaxPageSize by default is 50), then begin a transaction to insert / update the retrieved entities, then update the local __config table with the latest updatedAt timestamp, then try to retrieve next page records and execute the above processing again. AFAIK, PullAsync操作将提取50条记录(默认情况下MaxPageSize为50),然后开始事务以插入/更新检索到的实体,然后使用最新的updateAt时间戳更新本地__config表,然后尝试检索下一页记录并执行以上处理再次进行。

Note: The format of id column looks like this deltaToken|{table-name}|{query-id} . 注意: id列的格式如下: deltaToken|{table-name}|{query-id}

The pull operation request would look like: 拉操作请求如下所示:

https://<app-name>.azurewebsites.net/tables/<table-name>?$filter=(updatedAt ge datetimeoffset'2018-02-21T08:58:45.446Z')&$orderby=updatedAt&$skip=0&$top=50&__includeDeleted=true

I assume that you could query the local __config table to retrieve the latest updatedAt value or query the related local table to retrieve the latest updatedAt value, then add a small time interval to the current updatedAt and explicitly specify the filter on UpdatedAt property with the previous updatedAt when using the incremental pull operation. 我假设您可以查询本地__config表以检索最新的updatedAt值,或查询相关的本地表以检索最新的updatedAt值,然后向当前的updatedAt添加一个小的时间间隔,并使用先前的方法显式地指定UpdatedAt属性使用增量拉动操作时的updatedAt。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM