{"action":"opened","issue":{"url":"https://api.github.com/repos/alibaba/canal/issues/134","labels_url":"https://api.github.com/repos/alibaba/canal/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/canal/issues/134/comments","events_url":"https://api.github.com/repos/alibaba/canal/issues/134/events","html_url":"https://github.com/alibaba/canal/issues/134","id":119431428,"number":134,"title":"关于max memory size的问题","user":{"login":"lulu2panpan","id":15853650,"avatar_url":"https://avatars.githubusercontent.com/u/15853650?v=3","gravatar_id":"","url":"https://api.github.com/users/lulu2panpan","html_url":"https://github.com/lulu2panpan","followers_url":"https://api.github.com/users/lulu2panpan/followers","following_url":"https://api.github.com/users/lulu2panpan/following{/other_user}","gists_url":"https://api.github.com/users/lulu2panpan/gists{/gist_id}","starred_url":"https://api.github.com/users/lulu2panpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lulu2panpan/subscriptions","organizations_url":"https://api.github.com/users/lulu2panpan/orgs","repos_url":"https://api.github.com/users/lulu2panpan/repos","events_url":"https://api.github.com/users/lulu2panpan/events{/privacy}","received_events_url":"https://api.github.com/users/lulu2panpan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-30T06:49:12Z","updated_at":"2015-11-30T06:49:12Z","closed_at":null,"body":"Hi jianghang：\r\n在类MemoryEventStoreWithBuffer的checkFreeSlotAt方法中，\r\nif (batchMode.isMemSize()) {\r\n                final long memsize = putMemSize.get() - ackMemSize.get();\r\n                if (memsize < bufferSize * bufferMemUnit) {\r\n                    return true;\r\n                } else {\r\n                    return false;\r\n                }\r\n            } else {\r\n                return true;\r\n            }\r\n只判断memsize < bufferSize * bufferMemUnit还不够吧，应该用 ”当前空闲内存量+新加入事件所占内存量”和bufferSize * bufferMemUnit进行比较才对吧？？\r\n望指教。"}}