From: Michał B. <mic...@ge...> - 2010-09-21 08:49:50
|
Thank you for your remark. Now in the development branch we’ve made automatic data flushing every second. Please also have a look at this thread: http://sourceforge.net/mailarchive/forum.php?thread_name=00ba01cb5336%24e5765cf0%24b06316d0%24%40borychowski%40gemius.pl <http://sourceforge.net/mailarchive/forum.php?thread_name=00ba01cb5336%24e5765cf0%24b06316d0%24%40borychowski%40gemius.pl&forum_name=moosefs-users> &forum_name=moosefs-users Kind regards Michał From: 郑海洪 [mailto:zh...@uc...] Sent: Tuesday, September 21, 2010 3:58 AM To: moosefs-users Subject: [Moosefs-users] changelog on Metalogger not flush to disk instantly Dear Michał, I found the changelog on Metalogger machine not flush to disk instantly. I dig into the code, and found there miss a fflush in mfs-1.6.17/mfsmetalogger/masterconn.c:185. 142 void masterconn_metachanges_log(masterconn *eptr,const uint8_t *data,uint32_t length) { 143 char logname1[100],logname2[100]; ..... 182 data++; 183 version = get64bit(&data); 184 if (eptr->logfd) { 185 fprintf(eptr->logfd,"%"PRIu64": %s\n",version,data); fflush(eptr->logfd); //missed 186 } else { 187 syslog(LOG_NOTICE,"lost MFS change %"PRIu64": %s",version,data); 188 } 189 } I think this maybe a tiny bug, because the changelog is so important to the metalogger, we need to flush it instantly. Best regards! Haihong Zheng from China |