Show Menu
TOPICS×

Race Conditions and Error Handling

Describes how to prevent race conditions and DCS error handling.

Preventing Race Conditions

A race condition can occur if you send multiple calls simultaneously (or in rapid succession) to the DCS before it finishes responding to the initial queries and writing data to the user’s cookie. A race condition is undesirable because it can corrupt or improperly overwrite cookie data. As a best practice, consider the following methods to help avoid this problem:
  • Don't make simultaneous calls, or calls in rapid succession, to the DCS from the same user.
  • Wait for each response to come back before making subsequent calls.

Error Handling

Error handling is limited for invalid or poorly formed queries. An invalid request returns an HTTP 200 OK response and no data. Also, the DCS stops processing a request, discards trait data, and returns an HTTP 200 OK response when a user:
  • Opts out of tracking at the Audience Manager or partner level.
  • Comes from an invalid/unselected geographic region.
  • Disables browser cookies (either all or third-party).