hapijs / catbox

Multi-strategy object caching service
Other
494 stars 72 forks source link

Issues with pendingGenerateTimeout #177

Closed kanongil closed 7 years ago

kanongil commented 7 years ago

The pendingGenerateTimeout option (from #152) doesn't work as advertised.

  1. It doesn't work for non-stale responses.
  2. It only attempts to prevent multiple generates in the current process.
  3. If the cache expires while pending a generate, calling get() always trigger 503 / generateTimeout.
  4. It can cause get() to completely fail to respond (I have test to prove this).

…and more that I haven't fully investigated.

Given these, the feature really needs a total rewrite with a suitable test suite (currently, there is 1 functional test).

/cc @nathanmesserbbc

nathanmesserbbc commented 7 years ago

Hi Kanongil:

A few questions about your issues:

  1. What non-stale responses do you mean? Do you mean while the value is being generated for the first time, or something else?

  2. Yes, unless I've misunderstood something fundamental about catbox, everything (except the backend data store if not local memory) is local to the current process. All the protections in catbox for making excessive requests are just in the current process.

For 3. and 4. do you have tests you can share that show the problem?

kanongil commented 7 years ago

Regarding 4: This is actually caused by a catbox issue, fixed in #178. With the fix in place, we merely get an incorrect response.

hueniverse commented 7 years ago

This issue is not helpful. I need specific examples or failing tests to show the issues.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.