shreemaan-abhishek opened a new pull request, #13934:
URL: https://github.com/apache/apisix/pull/13934

   ### Description
   
   The shared etcd watcher publishes `watch_ctx.started` before calling 
`watchdir`. Config objects interpret that state as permission to wait only for 
events from the watcher. When a preload revision was available, watcher 
initialization skipped the range request that otherwise verified etcd was 
reachable, so config objects could wait on a watcher that had not connected.
   
   This change extracts that range request into an explicit availability check 
and runs it during every initial watcher setup. The preload revision remains 
the watch cursor when present, preventing writes made after the snapshot from 
being skipped; the revision returned by the availability check is used only 
when no preload revision exists.
   
   The startup-revision regression test now also verifies that the availability 
check occurs when the preload supplies the revision.
   
   #### Which issue(s) this PR fixes:
   
   N/A
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to