ldb: Explain why an entry can vanish from the index
authorAndrew Bartlett <abartlet@samba.org>
Mon, 28 May 2018 02:12:52 +0000 (14:12 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 30 May 2018 02:23:27 +0000 (04:23 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c

index 1a5867b7a0dbbf4510347496bbedbc655f723a9b..041dbdc4ed6e4a68b0100e2ff70d1d6a64769263 100644 (file)
@@ -1821,7 +1821,12 @@ static int ltdb_index_filter(struct ltdb_private *ltdb,
                                      LDB_UNPACK_DATA_FLAG_NO_DATA_ALLOC|
                                      LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC);
                if (ret == LDB_ERR_NO_SUCH_OBJECT) {
-                       /* the record has disappeared? yes, this can happen */
+                       /*
+                        * the record has disappeared? yes, this can
+                        * happen if the entry is deleted by something
+                        * operating in the callback (not another
+                        * process, as we have a read lock)
+                        */
                        talloc_free(msg);
                        continue;
                }