mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Correctly remove session cache value of expired session.
Summary: `CDataCacheRevision` stores current working timestamps in `m_timestamps` and stores complete timestamps (including unadmitted deferred values) in `m_originalTimestamps`. A value is "in" the cache if and only if its timestamp is in `m_timestamps`. In `writeNewRevision` the `.rev` file is written based on `m_originalTimestamps` so that unadmitted deferred values don't get lost. Session cache works by removing timestamps that were not created in the current session. But it needs to remove from both `m_timestamps` and `m_originalTimestamps` so that old session cache values can't get recreated by `writeNewRevision`. Test Plan: Currently being evaluated by @kbasan to check that it does not introduce unintended consequences. Reviewers: #swift_pilot_client, kbasan Reviewed By: #swift_pilot_client, kbasan Subscribers: jenkins, kbasan Tags: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D53
This commit is contained in:
@@ -429,7 +429,11 @@ namespace BlackMisc
|
||||
for (auto it = sessionIds.cbegin(); it != sessionIds.cend(); ++it)
|
||||
{
|
||||
m_sessionValues[it.key()] = it.value();
|
||||
if (it.value() != m_session->uuid()) { m_timestamps.remove(it.key()); }
|
||||
if (it.value() != m_session->uuid())
|
||||
{
|
||||
m_timestamps.remove(it.key());
|
||||
m_originalTimestamps.remove(it.key());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (revisionFile.size() > 0)
|
||||
|
||||
Reference in New Issue
Block a user