Commit f5463ad
hideki
Fixed #1593 - Missing changes on changes feed (Mac <- Android) pull replication
Same issue with https://github.com/couchbase/couchbase-lite-java-core/issues/1495
Referenced previous PR: #1521 , but this PR caused another another issue with `/_changes` REST API.
Notes:
- In case of `/_changes?feed=longpoll` REST API, there is case document is inserted or updated between calling `changesSince()` method and starting to observe Database change event. It could causing unhandled documents. This usually is caused by calling POST/PUT /{db}/{docID} and calling POST/GET /{db}/_changes?feed=longpool concurrently.
- To avoid above scenario, calling changesSince() method in DatabaseListener changed() callback method to make sure if any document changes occurs between them.
- Fixed the case startTimeout() is not called at line 1737.
- Make sure to set correct `since` value by deleting the method `sendLongpollChanges(rev)` that uses 0 as since value.1 parent 665ea66 commit f5463ad
1 file changed
Lines changed: 28 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
1644 | 1647 | | |
1645 | 1648 | | |
1646 | 1649 | | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | 1650 | | |
1652 | 1651 | | |
1653 | 1652 | | |
| |||
1700 | 1699 | | |
1701 | 1700 | | |
1702 | 1701 | | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
1703 | 1715 | | |
1704 | 1716 | | |
1705 | 1717 | | |
| |||
1734 | 1746 | | |
1735 | 1747 | | |
1736 | 1748 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
1741 | 1752 | | |
1742 | 1753 | | |
1743 | | - | |
1744 | 1754 | | |
1745 | 1755 | | |
1746 | 1756 | | |
| |||
1820 | 1830 | | |
1821 | 1831 | | |
1822 | 1832 | | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
1823 | 1842 | | |
1824 | 1843 | | |
1825 | 1844 | | |
| |||
0 commit comments