Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when add the third node program exit #7

Open
kevin-gjm opened this issue Jan 15, 2018 · 2 comments
Open

when add the third node program exit #7

kevin-gjm opened this issue Jan 15, 2018 · 2 comments

Comments

@kevin-gjm
Copy link

kevin-gjm commented Jan 15, 2018

hi
when I add the third node program exit.
ERROR msg: EINVAL: invalid argument

raft server me->entries[0] will change in the log_offer handler: __raft_logentry_offer

    e = mdb_txn_begin(sv->db_env, NULL, 0, &txn);
    if (0 != e)
        mdb_fatal(e);
    e = mdb_get(txn, sv->entries, &key, &val);
    switch (e)
    {
    case 0:
        break;
    default:
        mdb_fatal(e);
    }
    ety->data.buf = val.mv_data;
    ety->data.len = val.mv_size;
@kevin-gjm
Copy link
Author

kevin-gjm commented Jan 17, 2018

OK,I konw why do this!
but

struct MDB_val
Generic structure used for passing keys and data in and out of the database. 
Values returned from the database are valid only until a subsequent update operation, 
**or the end of the transaction**. Do not modify or free them, they commonly point into the database itself.

Here, after use the transaction.the value still valid ?? !!
Before I append entry 3 ,the first entry buf is 0x5c78efb0. After append entry 3 it changes to 0x5c78bfb0

@q96456
Copy link

q96456 commented Jun 20, 2018

how to solve the problem that program exit when I add the third node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants