Commit a40f66a
committed
Update microsoft-365 source pagination logic to not skip time range
**Description**
This commit updates microsoft-365 source pagination to not skip
events in certain cases.
PaginationCrawler saves Item lastModifiedAt as next poll attempt's
startTime in the coordinator table. Currently m365 source sets
Instant.now as lastModifiedAt(nextPollAttemptTime), which could skip
new arrived events between current last event's contentCreated time
and current timestamp.
The lastModifiedAt is updated to be contentCreated time(original
implementation) when there is next page, and eventTime+1ms when there
is no new page. This can ensure no missing event in any scenario as
well as no duplicate event in common scenario.
Signed-off-by: Wenjie Yao <wjyao@amazon.com>1 parent 39ef0c1 commit a40f66a
1 file changed
Lines changed: 10 additions & 4 deletions
File tree
- data-prepper-plugins/saas-source-plugins/microsoft-office365-source/src/main/java/org/opensearch/dataprepper/plugins/source/microsoft_office365/service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | 111 | | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
| 142 | + | |
| 143 | + | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
150 | 156 | | |
151 | | - | |
| 157 | + | |
152 | 158 | | |
153 | 159 | | |
154 | 160 | | |
| |||
0 commit comments