*** gampel1 has joined #openstack-smaug | 05:50 | |
openstackgerrit | zengchen proposed openstack/smaug: Implement time trigger with Eventlet https://review.openstack.org/296880 | 05:52 |
---|---|---|
chenzeng | yuval:if you are there, please look at my new version of timetrigger. i hope for your comments. thank you very much. | 05:57 |
chenzeng | saggi:if you have time, please look at my new version of timetrigger. thanks. | 05:57 |
openstackgerrit | zengchen proposed openstack/smaug: Implement time trigger with Eventlet https://review.openstack.org/296880 | 06:22 |
*** yuval has joined #openstack-smaug | 06:36 | |
*** CrayZee has quit IRC | 08:57 | |
*** CrayZee has joined #openstack-smaug | 09:14 | |
openstackgerrit | Merged openstack/smaug: Add dashboard to Local.conf https://review.openstack.org/296918 | 10:03 |
*** CrayZee has quit IRC | 10:07 | |
openstackgerrit | Merged openstack/smaug: Protection service basic design doc https://review.openstack.org/261455 | 10:16 |
openstackgerrit | Merged openstack/smaug: Proposed Smaug API v1.0 https://review.openstack.org/244756 | 10:18 |
*** saggi has quit IRC | 11:58 | |
chenzeng | yuval:are you there? how are you? | 12:02 |
chenzeng | yuval:i have seen your comments, thanks. | 12:03 |
chenzeng | yuval:i have left comments for you on review website. if you are on line, please ping me. | 12:26 |
chenzeng | yuval:thank you very much. | 12:26 |
chenzeng | ping yuval | 12:42 |
yuval | chenzeng: hey | 13:46 |
chenzeng | yuval:hi, how are you? | 13:47 |
yuval | chenzeng: very well, and you? | 13:47 |
chenzeng | yuval:fine, especially see your comments. | 13:48 |
chenzeng | yuval:i had replied you on review website, do you see it. | 13:49 |
yuval | chenzeng: yes, a few questions | 13:49 |
*** saggi has joined #openstack-smaug | 13:49 | |
chenzeng | yuval: i think we can reach an agreement today. | 13:49 |
yuval | chenzeng: one minute and i'm with you | 13:49 |
chenzeng | yuval:ok. | 13:49 |
openstackgerrit | Eran Gampel proposed openstack/smaug: Basic design doc for API Service https://review.openstack.org/266338 | 14:02 |
yuval | chenzeng: ping | 14:06 |
chenzeng | yuval:yes | 14:08 |
yuval | regarding canceling the greenthread after every add/remove operations: it is ok to cancel the thread and reschedule when we change the trigger recurrence | 14:08 |
yuval | but there is no need to cancel the green thread when we iterate through operations and send them to executor | 14:09 |
*** gampel1 has quit IRC | 14:12 | |
yuval | second, we can definetly use loopingcall, we can definetly use the DynamicLoopingCall for the TimeTrigger | 14:12 |
yuval | chenzeng: lets go over it one by one | 14:15 |
chenzeng | ok | 14:15 |
yuval | TimeTrigger includes a variable which contains a DynamicLoopingCall | 14:16 |
chenzeng | i understand you second. and i have updated codes. but i don't want to use it derectly. | 14:16 |
yuval | there is no problem in using it directly | 14:17 |
chenzeng | i don't want its additional functions, like make statistic the run time on every loop, and event. | 14:18 |
chenzeng | i will send the codes right now, you can look at it. if you have problem, we can go on. | 14:18 |
chenzeng | regarding the first | 14:19 |
chenzeng | i don't understand. | 14:19 |
yuval | the first one is irrelevant if we use loopingcall | 14:19 |
chenzeng | but you agree with cancel the thread. | 14:20 |
chenzeng | i don't understand. | 14:20 |
yuval | lets speak only about loopingcall | 14:20 |
yuval | what is the problem with it? | 14:20 |
chenzeng | i don't want its additional functions, like make statistic the run time on every loop, and event. | 14:21 |
chenzeng | i am worry about whether the greenthread can schedule on time. | 14:22 |
yuval | maybe there are functions that you don't need, that's ok. there is no sense in writing our own loopingcall when there is already one | 14:22 |
openstackgerrit | Merged openstack/smaug: Basic design doc for API Service https://review.openstack.org/266338 | 14:23 |
chenzeng | yuval:sorry, fogive my obstination. | 14:26 |
chenzeng | regarding the first one. | 14:27 |
yuval | did you understand what I was trying to say regarding the first one? | 14:27 |
chenzeng | i use the copy of operation_ids and trigger_property to avoid use the lock. | 14:27 |
chenzeng | sorry, not quite understand. | 14:28 |
yuval | ok | 14:28 |
yuval | in case we change the time trigger property, we must restart the greenthread, you did that great | 14:28 |
yuval | but when we add or remove operation_id from the set, there is no need to restart it | 14:29 |
chenzeng | agree | 14:29 |
yuval | when we start to iterate the oepration_id set, we can iterate a copy of it | 14:29 |
yuval | copy it just before we iterate it | 14:29 |
yuval | this way, we don't need to restart the greenthread everytime we add/remove operation | 14:30 |
chenzeng | ok, understand. | 14:30 |
yuval | great | 14:30 |
chenzeng | one question. | 14:30 |
chenzeng | if process as you said. the race condition is exist. how about add/move operation when you copy them? | 14:31 |
chenzeng | the add/move and copy can happen at the same time. | 14:32 |
chenzeng | yuval:? | 14:34 |
yuval | it can't happen at the same time, as eventlet's greenthreads don't work this way | 14:34 |
yuval | greenthreads make context switch when sleep/io is performed | 14:35 |
yuval | (and even if it was a problem, an add/remove could happen in the same place you did the copy) | 14:35 |
chenzeng | yes, this is the critical problem. | 14:35 |
yuval | but this issue doesn't happen with eventlet | 14:36 |
chenzeng | today, i have maked a test to check whether the rpc and timetrigger's greenthreads are in one thread. but i have no result. | 14:37 |
chenzeng | i did the test like this way. | 14:38 |
chenzeng | first, i write a log in rpc function, like that:def do_test(self, context): | 14:39 |
chenzeng | LOG.debug("start do_test, thead_name = %s", threading.current_thread().name) | 14:39 |
chenzeng | LOG.debug("start do_test, thead_name = %s", threading.current_thread().ident) | 14:39 |
chenzeng | eventlet_test.do_test() | 14:39 |
chenzeng | then the eventlet_test.do_test() create a greenthread, like that:def _do_test(): | 14:40 |
chenzeng | for i in range(20): | 14:40 |
chenzeng | LOG.debug("eventlet do_test, i = %(i)d, thead_name = %(name)s, ident=%(ident)d", | 14:40 |
chenzeng | {'i':i, 'name': threading.current_thread().name, | 14:40 |
chenzeng | 'ident': threading.current_thread().ident}) | 14:40 |
chenzeng | eventlet.sleep(1) | 14:40 |
chenzeng | def do_test(): | 14:40 |
chenzeng | eventlet.spawn_after(1, _do_test) | 14:40 |
yuval | chenzeng: let me look on it | 14:45 |
chenzeng | the result like that: start do_test, thead_name = MainThread, start do_test, thead_name = 139860480751424 | 14:46 |
chenzeng | eventlet do_test, i = 0, thead_name = GreenThread-5, ident=139860303232528 | 14:46 |
chenzeng | i am not sure whether they are in the same thread. | 14:47 |
chenzeng | because the thread name and ident is not same. | 14:47 |
chenzeng | yuval:? | 14:50 |
openstackgerrit | zengchen proposed openstack/smaug: Implement time trigger with Eventlet https://review.openstack.org/296880 | 14:51 |
yuval | chenzeng: im looking into messaging | 14:51 |
yuval | chenzeng: (rpc) | 14:51 |
chenzeng | ok, thanks. | 14:51 |
yuval | chenzeng: well | 14:57 |
yuval | chenzeng: if you'll look in smaug/rpc.py | 14:57 |
yuval | chenzeng: you can see that in get_server, the executor is eventlet | 14:58 |
chenzeng | yes | 14:58 |
chenzeng | i know | 14:58 |
*** chenzeng has quit IRC | 15:03 | |
*** chenying has quit IRC | 15:03 | |
*** x00350071 has quit IRC | 15:03 | |
*** yuval has quit IRC | 15:03 | |
*** zhonghua-lee has quit IRC | 15:04 | |
*** chenying has joined #openstack-smaug | 15:11 | |
*** zhonghua-lee has joined #openstack-smaug | 15:11 | |
*** c00281451 has joined #openstack-smaug | 15:11 | |
*** x00350071 has joined #openstack-smaug | 15:11 | |
*** dell__ has joined #openstack-smaug | 15:22 | |
dell__ | yuval:sorry, my network was lost. | 15:23 |
*** dell__ is now known as chenzeng | 15:23 | |
chenzeng | yuval:can you send your message to me. | 15:23 |
chenzeng | yuval:i am not sure whether the thread of rpc and the thread of timetrigger's greenthread are the same. are there any ways to verify it. | 15:30 |
chenzeng | i will go to sleep. thanks yuval. | 15:31 |
*** chenzeng has quit IRC | 15:31 | |
*** chenzeng has joined #openstack-smaug | 15:52 | |
chenzeng | i can communicate with yours on my phone . great | 15:55 |
*** chenzeng has quit IRC | 15:56 | |
*** x00350071 has quit IRC | 16:30 | |
*** x00350071 has joined #openstack-smaug | 16:31 | |
*** yinwei_computer has joined #openstack-smaug | 19:34 | |
openstackgerrit | Saggi Mizrahi proposed openstack/smaug: Add operation log endpoints to API document https://review.openstack.org/298060 | 20:17 |
*** chenying has quit IRC | 20:57 | |
*** chenying has joined #openstack-smaug | 20:58 | |
*** x00350071 has quit IRC | 21:48 | |
*** x00350071 has joined #openstack-smaug | 21:49 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!