[erlang-questions] mnesia:dirty_slot/2 returns [] for non-empty table?

Hakan Mattsson hakan@REDACTED
Wed Apr 22 09:31:16 CEST 2009


On Tue, 21 Apr 2009, Rick Pettit wrote:

> I've just begun digging through the mnesia source code, so it is probably
> a bit premature to ask, but does anyone have an idea why
> mnesia:dirty_slot/2 might be returning [] in this case (i.e. where the
> table is non-empty and where mnesia:dirty_first/1 returns a Key) ?

The man page for ets:slot/2 explains how the function works:

   This  function  is  mostly  for debugging purposes, Normally one
   should use first/next or last/prev instead.

   Returns all objects in the I:th slot of the table Tab.  A  table
   can  be  traversed  by repeatedly calling the function, starting
   with the first slot  I=0  and  ending  when  '$end_of_table'  is
   returned.  The  function  will  fail with reason badarg if the I
   argument is out of range.

/Håkan
---
Håkan Mattsson (uabhams)
Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list