Closed iychoi closed 10 years ago
AG needs to test entries before it publishes entires to MS to avoid duplicated entry updates.
Take a look at ms_client_get_listings() in libsyndicate/ms-client.cpp. It lets you download a batch of directories from the MS, so you can see if files exist and are as fresh as your cached copies.
Basically, you build up a vector of ms_path_ent structures (using ms_client_make_path_ent()) that represent an absolute path in the filesystem (note: vector
You should be able to do something similar to query the MS for the current set of entries it knows about, as well as how fresh the MS thinks they are. In fact, this is a large part of what the UG does--it maintains a cached metadata tree in RAM that it keeps consistent with the MS via successive calls to ms_client_get_listings() (via fs_entry_revalidate_path()).
I'm working on this right now, as part of refactoring the AG.
Fixed in da8c79d5252f656c001ca416723c29271b5e680e
AG drivers need existing directory information prior to populate file entries.