@@ -264,11 +264,13 @@ where
264264 /// create this struct with different values.
265265 durability : Durability ,
266266
267- /// The revisiono in which the tracked struct was first-created.
268- /// This is different from `updated_at` which gets bumped on every read.
267+ /// The revision in which the tracked struct was first created.
269268 ///
270- /// Tracking `created_at` is important to detect tracked struct ids
271- /// that are being reused after they've been freed in a previous revision.
269+ /// Unlike `updated_at`, which gets bumped on every read,
270+ /// `created_at` is updated whenever an untracked field is updated.
271+ /// This is necessary to detect reused tracked struct ids _after_
272+ /// they've been freed in a prior revision or tracked structs that have been updated
273+ /// in-place because of a bad `Hash` implementation.
272274 created_at : Revision ,
273275
274276 /// The revision when this tracked struct was last updated.
@@ -472,11 +474,11 @@ where
472474
473475 // The protocol is:
474476 //
475- // * When we begin updating, we store `None` in the `created_at ` field
476- // * When completed, we store `Some(current_revision)` in `created_at `
477+ // * When we begin updating, we store `None` in the `updated_at ` field
478+ // * When completed, we store `Some(current_revision)` in `updated_at `
477479 //
478480 // No matter what mischief users get up to, it should be impossible for us to
479- // observe `None` in `created_at `. The `id` should only be associated with one
481+ // observe `None` in `updated_at `. The `id` should only be associated with one
480482 // query and that query can only be running in one thread at a time.
481483 //
482484 // We *can* observe `Some(current_revision)` however, which means that this
0 commit comments