ETS retrieve all objects before deleting the table

Hugo Mills hugo@REDACTED
Tue Jan 18 16:02:02 CET 2022


   I may be wrong, but my reading of Frank's requirement was that the
table needs to be serialised to disk in some external format so that
it can be processed by some additional tool outside the current erlang
application. No amount of reparenting to another erlang process in the
same VM is going to accomplish that...

   Hugo.

On Tue, Jan 18, 2022 at 03:49:51PM +0200, Led wrote:
> >
> > I think this opinion stems from confusion about the GiftData argument
> > in ets:give_away/3.
> >
> > AFAIK this just passes whatever 'data' you set for the variable, not
> > the actual table data, through to the recipient of the 'ETS_TRANSFER'
> > message.
> 
> It gives all table data with full access to the process "for
> processing". What else do you need?
> 
> >
> > On Tue, Jan 18, 2022 at 7:28 AM Frank Muller <frank.muller.erl@REDACTED> wrote:
> > >
> > > No it doesn’t. It only charges the table owner
> > >
> > >
> > >> >
> > >> >
> > >> >> > I’d like to retrieve all objects before deleting the table.
> > >> >>
> > >> >> Strange task. Table is already "all objects".
> > >> >
> > >> >
> > >> > Nothing strange. Just a simple requirement.
> > >> > Objects are sent elsewhere for processing before deleting the table content.
> > >> >
> > >> >>
> > >> >> > What’s the most efficient way to do it?
> > >> >>
> > >> >> ets:give_away/3
> > >> >
> > >> >
> > >> > That’s strange indeed. How give_away/3 could help? It gives the ownership to another proc.
> > >>
> > >> It actually sends all objects elsewhere (to another proc) for processing.
> > >>

-- 
Hugo Mills             | All hope abandon, Ye who press Enter here.
hugo@REDACTED carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |


More information about the erlang-questions mailing list