Renamed files revert back to old names

After renaming files in the Mac Finder they revert back a few second later to the old names. However when I check Google Drive (the underlying cloud service) they names have actually changed.

When I do a “refresh” of odrive the changed (new) names appear.

This feels like some minor bug in the desktop client of odrive

Hi @ovdm,
I am not able to reproduce this, but it sounds like this could be due to a delay in Google reflecting the rename when requesting a listing of the folder again.

In other words:

  • odrive renames the file successfully
  • odrive then asks for a listing of the folder where this file resides, shortly after.
  • The listing Google provides still has the old name in it because Google’s reflection is delayed, despite them having processed the rename.
  • odrive sees the listing with the old name and thinks that it had been renamed back to the original name, so it processes that change locally.
  • Later, Google properly reflects the rename, odrive sees this and changes it again on the local side.

If the above is happening, we should be able to see it in the Sync activity log (found at the top of the odrive menu under “Ready to sync new changes/Syncing changes” -> “Open sync activity log”.

  1. Can you try to reproduce this and then copy and paste the events that show up in the sync activity log so I can take a look?
  2. Can you also send a diagnostic from the odrive tray menu (at the bottom)?

No. It is the other way around

  • odrive initially renames the file successfully
  • the listing google drive reflects the new name
  • a few seconds later (5 second maybe), odrive reverts to the old name
  • In Google drive the rename “sticks”
  • odrive only catches up if I do a manual refresh

Overall this is not a huge issue as the rename is done and the no data is lost. However it is unsettling as clearly something is not fully in sync

Hi @ovdm,

This can be hard to determine. The local name will be changed because you changed it. odrive will push the rename to Google. Shortly after, odrive will request a listing from Google using their API. This listing may have the old information in it (not yet updated to reflect the remote rename). odrive will see that and revert the local name back, to reflect what Google is saying. A subsequent refresh from Google’s API will now have the updated information, so the local name switches again.

If you can provide the relevant sync activity log entries for the rename action and send a diagnostic, I can say for sure if this is happening. If not, I should hopefully be able to figure out why you are seeing this behavior so that we can correct it.

This is what is in the sync log file:

22 Mar 09:55:36AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-delan-employment-letter-signed.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-09-22-delan-employment-letter-signed.pdf
22 Mar 09:55:36AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/mergebase-loan-agreement-with-ken.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2019-09-27-mergebase-loan-agreement-with-ken.pdf
22 Mar 09:55:37AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khanh-intern-employment-letter.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-09-18-khanh-intern-employment-letter.pdf
22 Mar 09:55:38AM INFO Successful Move (Local to Remote) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khahn-employment-letter-continue.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2022-03-22-khahn-employment-letter-continue.pdf
22 Mar 09:55:48AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2022-03-22-khahn-employment-letter-continue.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khahn-employment-letter-continue.pdf
22 Mar 09:55:48AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-09-22-delan-employment-letter-signed.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-delan-employment-letter-signed.pdf
22 Mar 09:55:59AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2020-09-18-khanh-intern-employment-letter.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khanh-intern-employment-letter.pdf
22 Mar 09:55:59AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2019-09-27-mergebase-loan-agreement-with-ken.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/mergebase-loan-agreement-with-ken.pdf

as you can see the files are renamed and then a few seconds later are renamed back (automatically). Why that happens, I don’t know.

Hi @ovdm,
Thanks for the log snippet!

Taking this example you can see that odrive requested a rename, which was successful. “Local to Remote” means the change was seen on the local side and pushed to the remote.

22 Mar 09:55:38AM INFO Successful Move (Local to Remote) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khahn-employment-letter-continue.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2022-03-22-khahn-employment-letter-continue.pdf

10 seconds later odrive requests a listing of the folder and sees that the file has been “renamed” on the remote side (in reality I think this is just that Google has stale information). “Remote to Local” means that odrive sees the change on the remote side and then mimics that on the local side.

22 Mar 09:55:48AM INFO Successful Move (Remote to Local) for /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/2022-03-22-khahn-employment-letter-continue.pdf to /Users/oscar/odrive/Google Drive/MergeBase/legal/employment/signed/khahn-employment-letter-continue.pdf

It isn’t included in the snippet you posted, and I haven’t seen a diagnostic come through yet to verify, but my guess is there is a later “Remote to Local” event that changes the name again, back to the name that was originally sent to Google in the “Local to Remote” sync event.

I have exactly the same issue as OP, but so far only in certain folders. Yes, eventually (I think after the next remote scan) it will correct the name but it is highly confusing nonetheless. Is there an advanced setting to compensate for the eventual consistency delay, something like "delayListingRequestAfterLocalChange": 15? I don’t want to completely disable the listing requests, just push the delay a little further to prevent this from happening.

By the way, Google’s own Backup and Sync client does not have this issue.

Hi @richard,
My apologies. I missed your message here yesterday. We will take a look at what could potentially be done here with a user-specified override setting.

Hi @richard,
Are you on Mac or Windows?

I may soon have a test build for you to try to see if it resolves your eventual consistency issue.

That would be great! The issue is 100% reproducible on certain frequently used Google Drive folders that are shared with multiple users so it would be easy to verify if that change works and what the minimum required delay is.

We are on Mac: macOS Big Sur 11.5.2 (Apple Silicon) & macOS Monterey beta 6 (Intel).

Hi @richard,
Here is the test build:
Download here

You don’t have to change any parameters. This version tries to determine if a recent remote rename/move was performed on the path and will delay action (~ 2minutes) to re-check it, if it has.

@ovdm if you are still experiencing these issues you can also give this build a shot, if you have an easily reproducible scenario.

Thanks @Tony,

I uploaded 1.pdf to the slow folder, after it synced I renamed 1.pdf to 2.pdf. After the ~2 minute delay odrive renamed it back to 1.pdf and 11 seconds later it renamed it to 2.pdf. I think this is not what you expected.

02 Sep 06:15:20PM INFO Successful Upload File for Item: /Users/richard/odrive/Google Drive/A/B/C/1.pdf - Size: 48851 Bytes - Date: 2021-09-01 15:12:40
02 Sep 06:15:33PM INFO Successful Move (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/1.pdf to /Users/richard/odrive/Google Drive/A/B/C/2.pdf - Size: NA - Date: NA
02 Sep 06:17:50PM INFO Successful Move (Remote to Local) for Item: /Users/richard/odrive/Google Drive/A/B/C/2.pdf to /Users/richard/odrive/Google Drive/A/B/C/1.pdf - Size: NA - Date: NA
02 Sep 06:18:01PM INFO Successful Move (Remote to Local) for Item: /Users/richard/odrive/Google Drive/A/B/C/1.pdf to /Users/richard/odrive/Google Drive/A/B/C/2.pdf - Size: NA - Date: NA

Then, in the web version of Google Drive I renamed another file in this directory. So far (~12 minutes later) it hasn’t synced to odrive.

Hi @richard ,
Such a long delay for eventual consistency is unexpected. Do you happen to have a folder you can share that we can test with? I haven’t been able to reproduce this in any of my own folders yet.

If you browse out and back into the folder or right-click->refresh on the folder, it should pick-up the change. There is a background routine that periodically asks Google for changes, but it won’t run until the first full scan is complete on odrive startup, which is why you may be seeing a delay.

Hi Tony, not seeing the issue anymore with the renamed files reverting to their original name on Google Drive volumes. I did see a lot of items “waiting” on my MacBook. Need to check if that is gone

1 Like

@richard Here is another build that extended the wait a bit more.

When you get a chance, let me know if this improves the behavior. If not, can you send a diagnostic from the odrive tray menu?

No improvement, it just renames it back later.

03 Sep 12:41:54AM INFO Successful Upload File for Item: /Users/richard/odrive/Google Drive/A/B/C/1.pdf - Size: 48851 Bytes - Date: 2021-09-01 13:16:15
03 Sep 12:42:11AM INFO Successful Move (Local to Remote) for Item: /Users/richard/odrive/Google Drive/A/B/C/1.pdf to /Users/richard/odrive/Google Drive/A/B/C/2.pdf - Size: NA - Date: NA
03 Sep 12:46:35AM INFO Successful Move (Remote to Local) for Item: /Users/richard/odrive/Google Drive/A/B/C/2.pdf to /Users/richard/odrive/Google Drive/A/B/C/1.pdf - Size: NA - Date: NA

Diagnostics sent!

EDIT Nevermind, I found a folder from 2014 that exhibits this behavior. What I am seeing is that it just takes a really long time for the reflection to take place across all of the nodes that may be hit. In my case it took about 5 minutes. I was actually able to observe the name flip a few times within that 5 minutes until it finally settled with the correct name.

I guess older structure may be “optimized” to be less aggressive in its reflection, to prioritize newer structure. It makes sense, but causes this pain here. The only option may be to increase the delay more. I will keep playing with it.


Previous message

Thanks @richard . I really appreciate your willingness to work through this.

It is a large hindrance not being able to reproduce this so that we can walk through it. Is there any chance you have a folder that can reproduce this that has dummy data in it or is just empty? Something you can share with me so that we can debug the flow on this? That should allow us to get to the bottom of it.

Great to hear that you’ve been able to reproduce the issue yourself!

Hi @richard,
Here’s another shot at it, if/when you have a chance to try it.