mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-11-29 18:58:35 +08:00
bug fix
This commit is contained in:
parent
e6d84536bf
commit
2a1af09f19
@ -878,7 +878,6 @@ void SendInvalWal(WalLdPageKey *walkey) {
|
||||
}
|
||||
|
||||
void SendInvalPage(LdPageKey *ldKey) {
|
||||
elog(LOG,"====SendInvalPage");
|
||||
int sock_fd;
|
||||
struct sockaddr_un un;
|
||||
un.sun_family = AF_UNIX;
|
||||
@ -946,7 +945,6 @@ void *CleanWalsInLmdb(void *arg) {
|
||||
}
|
||||
|
||||
void *CleanPagesInLmdb(void *arg) {
|
||||
elog(LOG,"CleanPageInLmdb");
|
||||
int fd, new_fd,size;
|
||||
struct sockaddr_un un;
|
||||
static char data_buf[SizeOfCleanPage];
|
||||
@ -960,9 +958,7 @@ void *CleanPagesInLmdb(void *arg) {
|
||||
elog(PANIC, "bind cleanwal socket failed");
|
||||
if (listen(fd, MaxBackends+8) < 0)
|
||||
elog(PANIC, "listen cleanwal socket failed");
|
||||
elog(LOG,"+++before while");
|
||||
while(1) {
|
||||
elog(LOG,"+++++start listen\n");
|
||||
new_fd = accept(fd, NULL, NULL);
|
||||
if (new_fd < 0)
|
||||
{
|
||||
@ -970,10 +966,8 @@ void *CleanPagesInLmdb(void *arg) {
|
||||
unlink(p_socketfile);
|
||||
elog(PANIC, "cannot accept client connect request");
|
||||
}
|
||||
elog(LOG,"new_fd is %d",new_fd);
|
||||
memset(data_buf, 0, SizeOfCleanPage);
|
||||
size = read(new_fd, data_buf, SizeOfCleanPage);
|
||||
elog(LOG,"+++size is %d",size);
|
||||
LdPageKey *lpk = (LdPageKey *)data_buf;
|
||||
|
||||
// elog(LOG, "receive request: rel %d, fork %d, blk %d, lsn %ld",
|
||||
@ -1163,7 +1157,6 @@ CleanWalsByTable(WalLdPageKey *walkey)
|
||||
static void
|
||||
CleanPagesByTable(LdPageKey *ldKey)
|
||||
{
|
||||
elog(LOG,"++++++CleanPageByTable processing");
|
||||
MDB_txn *tmptxn;
|
||||
MDB_cursor *tmpcursor;
|
||||
MDB_val key, data;
|
||||
@ -1180,7 +1173,6 @@ CleanPagesByTable(LdPageKey *ldKey)
|
||||
relid = ldKey->sk.relid;
|
||||
forkno = ldKey->sk.forkno;
|
||||
blkno = ldKey->sk.blkno;
|
||||
elog(LOG,"dbid is %d,relid is %d,forkno is %d,blkno is %d",dbid,relid,forkno,blkno);
|
||||
success = mdb_txn_begin(pageEnv, NULL, 0, &tmptxn);
|
||||
// mdb_txn_begin(pageEnv, NULL, 0, &tmptxn);
|
||||
if (success != 0)
|
||||
@ -1206,8 +1198,8 @@ CleanPagesByTable(LdPageKey *ldKey)
|
||||
}
|
||||
|
||||
ldKey = (LdPageKey *)key.mv_data;
|
||||
elog(LOG, "get page db %d, rel %d, fork %d, blk %d",
|
||||
ldKey->sk.dbid, ldKey->sk.relid, ldKey->sk.forkno, ldKey->sk.blkno);
|
||||
// elog(LOG, "get page db %d, rel %d, fork %d, blk %d",
|
||||
// ldKey->sk.dbid, ldKey->sk.relid, ldKey->sk.forkno, ldKey->sk.blkno);
|
||||
|
||||
while (ldKey->sk.dbid == dbid
|
||||
&& ldKey->sk.relid == relid
|
||||
|
@ -275,7 +275,6 @@ void mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
|
||||
*/
|
||||
void mdunlink(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo)
|
||||
{
|
||||
elog(LOG,"+++mdunlink");
|
||||
LdPageKey ldKey;
|
||||
/* Now do the per-fork work */
|
||||
if (forkNum == InvalidForkNumber)
|
||||
|
Loading…
Reference in New Issue
Block a user