Commit 10a7b993 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1611 Log reading lsn now reads it as disk order instead of hardcoded network order.

Previous commit [10714] should say addresses #1611 instead of #10694

git-svn-id: file:///svn/toku/tokudb@10715 c7de825b-a66e-492c-adef-691d508d4ae1
parent df3cffa1
......@@ -927,9 +927,15 @@ static int peek_at_log (TOKULOGGER logger, char* filename, LSN *first_lsn) {
unsigned char header[SKIP+8];
int r = read(fd, header, SKIP+8);
if (r!=SKIP+8) return 0; // cannot determine that it's archivable, so we'll assume no. If a later-log is archivable is then this one will be too.
u_int64_t lsn = 0;
int i;
for (i=0; i<8; i++) lsn=(lsn<<8)+header[SKIP+i];
u_int64_t lsn;
{
struct rbuf rb;
rb.buf = header+SKIP;
rb.size = 8;
rb.ndone = 0;
lsn = rbuf_ulonglong(&rb);
}
r=close(fd);
if (r!=0) { return 0; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment