question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discuss cache named actor in core worker locally.

See original GitHub issue

Bulk users use ray.get_actor(name=xxx) temporarily, and it’s necessary to enable caching named actor in core worker locally.

Before support it, we’d better to discuss the behavior of ray.get_actor().

There 're 2 facts of the current named actor now:

  • one is ray.get_actor() supports the same name for different actors serially:
a = ActorA.options(name="named_actor").remote()
ray.exit_actor(a, no_restart=True)
b = ActorB.options(name="named_actor").remote()       # It does work!!!
  • another one is that ray.get_actor() will raise a ValueError if the name doesn’t exist.

I’d like to propose these: (1) named actor doesn’t support duplicated name with different actors. Because this is not a strong requirement and if we enable this, users may use it incorrectly as well. (2) ray.get_actor() returning None indicates there doesn’t exist the name, and returning not None indicates we found a handle for the name but we don’t promise the actor is valid. If that’s an invalid handle, remote call will raise the corresponding exception.


BTW, the reason for proposing no duplicated name for different actors is local core worker has no way to be notified the deletion event.(GCS pubs the deletion event is not a good idea.)

After those changes, we can support the TTL for the named actor cache locally.

@edoakes @kfstorm @rkooo567 @simon-mo @raulchen cc

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jovany-wangcommented, Aug 5, 2021
1reaction
jovany-wangcommented, Jul 19, 2021

@WangTaoTheTonic will follow up this item.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Does Caching Work in ASP.NET Core? - Hazelcast
In-memory caching uses the server memory to store cached data locally, and distributed caching distributes the cache across various servers. We' ...
Read more >
Working With A Distributed Cache In ASP.NET Core - C# Corner
In this article, we will talk about distributed cache. It can help us to improve the performance and scalability of the application, ...
Read more >
Cache Manager - Caching Framework for C# .NET
CacheManager is an open source caching framework for .NET written in C# and is available via NuGet. It supports various cache providers and...
Read more >
Caching guidance - Azure Architecture Center | Microsoft Learn
Learn how caching can improve the performance and scalability of a system by copying frequently accessed data to fast storage close to the...
Read more >
Distributed Caching with Microsoft Orleans - Forty Years of Code
A high-scale IDistributedCache service based on Microsoft Orleans with ADO persistence.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found