[PATCH] box/memtx: Allow to skip tuple memory from coredump

Cyrill Gorcunov gorcunov at gmail.com
Mon May 13 13:33:55 MSK 2019


On Mon, May 13, 2019 at 01:21:21PM +0300, Vladimir Davydov wrote:
> [Cc += Alexander]
> 
> I don't quite like the name: memtx_memory_dontdump. We might want to
> extend it to work on vinyl memory as well one day - I don't think we'd
> want to introduce another cfg parameter for that. What about strip_core?

I don't mind.

> 
> Alexander, what do you think about the new configuration parameter name?
> Do you have a better name in mind?
> 
> Cyrill, please see a few comments inline.
> 
> 
> Please write a doc bot request in the end of the commit message
> (after Fixes ...). Take a look at this for a reference:
> 
> https://github.com/tarantool/tarantool/commit/22db9c264c9119d19a3130e6ad8e7fded0e16c6d

Thanks, will do.

> >  7 files changed, 19 insertions(+), 9 deletions(-)
> 
> Please run all tests. I think box/cfg will break after this.

Will take a look.

> >  static void
> >  engine_init()
> >  {
> > +	uint32_t slab_flags = SLAB_ARENA_PRIVATE;
> > +	if (cfg_geti("memtx_memory_dontdump"))
> > +		slab_flags |= SLAB_ARENA_DONTDUMP;
> > +
> 
> Interpreting dontdump option here and converting it to slab_flags kinda
> breaks encapsulation. I'd pass cfg parameter to memtx_engine_new and let
> it interpret it.

ok

> > @@ -54,7 +54,7 @@ vy_mem_env_create(struct vy_mem_env *env, size_t memory)
> >  	/* Vinyl memory is limited by vy_quota. */
> >  	quota_init(&env->quota, QUOTA_MAX);
> >  	tuple_arena_create(&env->arena, &env->quota, memory,
> > -			   SLAB_SIZE, "vinyl");
> > +			   SLAB_SIZE, SLAB_ARENA_PRIVATE, "vinyl");
> 
> I think it's safe to skip dumping this arena, too.

ok


	Cyrill



More information about the Tarantool-patches mailing list