[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Page Leak?



Can I use `mdb_dump | mdb_load` (roughly) to get the db back to a stable state?  Any ideas what is going on?  I have no idea how to reproduce this bug, so I'm not sure what to put in a bug report... and I can't share the db.

-Andrew 

On Tue, Nov 19, 2019 at 1:23 PM Andrew Spott <andrew.spott@gmail.com> wrote:
mdb_dump didn't complain.

-Andrew

On Tue, Nov 19, 2019 at 9:49 AM Howard Chu <hyc@symas.com> wrote:
Andrew Spott wrote:
> When looking at the code for mdb_env_copyfd1 (the copy with compaction function), there is this clause[0]:
>
> if (rc == MDB_SUCCESS && root != new_root) {
>     rc = MDB_INCOMPATIBLE; /* page leak or corrupt DB */
>  }
>
>
> Since this happens at the end of the function, and I'm seeing the mdb_copy -c takes a while, I figured this was the error that I was seeing.
>
> If this isn't it, then what am I looking at?  If it is a corrupt DB, is there anything I can do to figure out how to fix this?

Try using mdb_dump to get a backup instead, see if it succeeds or complains.
>
> [0] https://github.com/LMDB/lmdb/blob/c3e6b4209eed13af4a3670e5f04f42169c08e5c6/libraries/liblmdb/mdb.c#L10311-L10312
>
> -Andrew
>
> On Sat, Nov 16, 2019 at 7:24 AM Howard Chu <hyc@symas.com <mailto:hyc@symas.com>> wrote:
>
>     Andrew Spott wrote:
>     > I apologize if this is the wrong place to ask this, let me know if there is someplace better.
>     >
>     > So, when doing a `mdb_copy -c`, I've run into the error message:
>     >
>     > mdb_copy: copying failed, error -30784 (MDB_INCOMPATIBLE: Operation and DB incompatible, or DB flags changed)
>     >
>     > When looking at the mdb_copy man page, it says that mdb_copy with compaction might fail if the database has a 'page leak'.
>     >
>     > Since that appears to be what has happened...
>
>     The error message you got has nothing to do with a page leak.
>
>     > can anyone tell me what that means?  Does this mean that the data could be corrupted?  How do I fix this?
>     >
>     > Thanks!
>     >
>     > -Andew
>
>
>     --
>       -- Howard Chu
>       CTO, Symas Corp.           http://www.symas.com
>       Director, Highland Sun     http://highlandsun.com/hyc/
>       Chief Architect, OpenLDAP  http://www.openldap.org/project/
>


--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/