|
Is this really possible? The MDS would mark the other replicas stale as soon as the client tried to write, so the client would have to be evicted, "lfs mirror resync" run and finish on the file to clear the STALE flag from the mirrors, and then the client would write to the primary before it detected that it was evicted? It seems like a long time for the client to not detect that it is evicted?
One possible solution would be for the MDS to bump the layout version of a file if it evicts a client that is writing to it. Then the evicted client would have to re-fetch the layout before it could write again. Alternately, flag the primary with an "EVICTED" flag that only triggers the layout version to be increased when "lfs mirror resync" is actually run. That would avoid bumping the version repeatedly and hurting other clients writing to the same file, without any danger that the STALE flag is cleared.
|