mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-28 08:27:26 +02:00
fix databroker restart versioning, handle missing sessions (#1145)
* fix databroker restart versioning, handle missing sessions * send empty server version to detect change * only rebuild if there are updated records
This commit is contained in:
parent
a5e8abd6af
commit
557aef2a33
7 changed files with 53 additions and 62 deletions
|
@ -230,6 +230,13 @@ func (srv *Server) Sync(req *databroker.SyncRequest, stream databroker.DataBroke
|
|||
// reset record version if the server versions don't match
|
||||
if req.GetServerVersion() != srv.version {
|
||||
recordVersion = ""
|
||||
// send the new server version to the client
|
||||
err := stream.Send(&databroker.SyncResponse{
|
||||
ServerVersion: srv.version,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
db, err := srv.getDB(req.GetType())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue