twitter-archive / kestrel

simple, distributed message queue system (inactive)
http://twitter.github.io/kestrel
Other
2.77k stars 312 forks source link

may be a bug . in Jouranl.scala #50

Closed Nyu2Y closed 13 years ago

Nyu2Y commented 13 years ago

when queueConfig.sycnJournal not equal 0.seconds or Duration.maxValue, Journal will not work PersistentQueueSpec will stop at queue.remove , and not retrun . because :

change
kestrel / src / main / scala / net / lag / kestrel / Journal.scala  line:471 if (allowSync) future() to if (allowSync) future it seems work well .

I am not familiar with promise , please check it . wait your comment .

robey commented 13 years ago

if syncJournal is not 0 or max, the promise should be added to the "promise list" (promises). then the periodic timer on line 20 will call fsync, which sets the promise values on line 31.

Nyu2Y commented 13 years ago

i have a problem , why 'if (allowSync) future() ' futrue with ''()''?

whats the different between future() and future at in kestrel / src / main / scala / net / lag / kestrel / Journal.scala line:471

robey commented 13 years ago

future() causes it to block, waiting for the future to be fulfilled.