Contacts Removal - Update

4:49 AM 0 Comments

Shared Contacts for Gmail Engineering Team

On July 23rd, 2019 several Shared Contacts for Gmail customers saw their number of contacts decreasing, dramatically for some of them.

Since that day, our engineers and support team have worked intensively with Google to return the situation back to normal.

What happened?

Our synchronization process works as follows:

  • Shared Contacts for Gmail regularly retrieves from Google Contacts API contacts lists of all its users
  • These contact lists show the status history of each contact (status can be "created", "updated", "deleted")
  • Note that when a contact was deleted and later the same contact was recreated later, it is considered as a single contact that had 3 status: "created, deleted, created". 
  • Shared Contacts for Gmail checks the latest status of each contact before synchronizing it
  • If the latest status is "deleted" and the user who deleted has "write permission" on this contact, then the application will remove it from the shared group for all the users.

For each contact, we normally receive the history of statuses for this contact in chronological order (ex: created, deleted, created)

For some reason, on July 23rd, we received the list of statuses in a different order. If some contacts were deleted in the past, the "deleted" status appeared as the most recent one. (we were not checking the date for faster treatment)

Therefore, Shared Contacts for Gmail falsely considered some of these contacts as "deleted" and removed them from the shared labels.

How did we find out?

As we take data privacy very seriously and we apply GDPR-compliance level to every step of our processes, we focused on analyzing our code first to make sure no bug or programming error was responsible for this disappearance.

After that only, we analyzed some of the deleted contacts with the approval of their owners, who agreed to participate in the investigation and let us compare some of their disappeared contacts with our logs, which helped us to discover the reason of the deletion.

What did we do to fix the issue?

When we found out that the history of the statuses was corrupted, we immediately:

  1. Stopped the removal process for the other customers that were not affected yet
  2. Restored the deleted contacts for infected customers
  3. Added the following patch:

    Now, when we receive a contact from Google API, we do not only take the "last" status into consideration anymore, but we first sort the status history by date.

Note that if you are concerned, after the restoration of contacts, you may have seen the number of contacts decreasing again. This is normal:

The restoration necessarily created duplicated contacts as we restored all the contacts that were backed up from Google. As Shared Contacts for Gmail automatically removes the duplicates, when synchronizing, the number of contacts after the first synchronization was logically lower if duplicates were found.

How will we prevent such a problem happening again? 

The fix we have immediately applied (checking the date of each status) will ensure that this problem does not happen again.

This simple fix solved this issue but we needed to anticipate any other similar issues that could arise.

For that reason, we took the following measures:

  • Systematically log any contact deletion by systematically saving the reason why a contact was deleted as well as the author of the deletion.
  • Hold the contact removal process if some abnormal activity is detected (if we have 15% more contact removals that the average in the same sync round, we will stop the removal process and analyze if this is normal before continuing the process )
  • Starting October 1st, 2019, we will include our developer's team to communicate directly with some of our customers for any new kind of request, so that they will have a better sense of the customer situation when a bug occurs.
  • Upgrade to the more reliable Google People API to manage contacts ( the current Google Contacts API is due to be deprecated next year and it could explain why some statuses didn't get through as usual).

What we have to say?

If you are one of the customers concerned by this setback, you must have been very upset and freaked out to see some of your contacts disappear. Anyone would have reacted the same.

But we want to say that our support team was impressed by how patient and helpful most of our customers were. We are very grateful for that!

This type of issue must never happen again, and we have learned a lot from this ordeal.

At Shared Contacts for Gmail thrive to always provide not only the best support but also the best service reliability.

We failed this time, but we are now stronger than ever to guarantee top quality of service.

All the domains that were affected will receive an extension of 2 weeks of service and will be placed on priority for the release of our new Shared Contacts for Gmail Next-Gen version (with new features to be announced soon).

The extension will be automatically applied. If you see that it was still not applied by August 15th, please let us know.

Thanks again for your patience.

Your Shared Contacts for Gmail Engineering Team

Stuart Baldock

If you enjoyed reading this blog post, like it, share it, or add your comments. Follow us and visit our website.