Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

rgw_sal_motr, motr_gc: [CORTX-33180] GC thread processing logic #371

Merged
merged 1 commit into from
Aug 2, 2022
Merged

rgw_sal_motr, motr_gc: [CORTX-33180] GC thread processing logic #371

merged 1 commit into from
Aug 2, 2022

Conversation

sachinpunadikar
Copy link

@sachinpunadikar sachinpunadikar commented Aug 1, 2022

GC thread processing logic

The GC thread will acquire GC index and process the object entries for
deletion either up-to the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@github-actions github-actions bot added the rgw label Aug 1, 2022
@sachinpunadikar sachinpunadikar changed the title WIP: rgw_sal_motr, motr_gc: GC thread processing logic WIP: rgw_sal_motr, motr_gc: [CORTX-33180] GC thread processing logic Aug 1, 2022
The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>
@sachinpunadikar sachinpunadikar changed the title WIP: rgw_sal_motr, motr_gc: [CORTX-33180] GC thread processing logic rgw_sal_motr, motr_gc: [CORTX-33180] GC thread processing logic Aug 2, 2022
@sumedhak27 sumedhak27 merged commit 5650988 into Seagate:Motr_GC Aug 2, 2022
@sachinpunadikar sachinpunadikar deleted the processing_logic branch August 2, 2022 05:51
sumedhak27 pushed a commit that referenced this pull request Aug 3, 2022
The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>
sumedhak27 pushed a commit to sumedhak27/cortx-rgw that referenced this pull request Aug 9, 2022
The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>
DPG17 added a commit to DPG17/cortx-rgw that referenced this pull request Aug 11, 2022
…on. (Seagate#385)

* rgw_sal_motr, motr_gc: [CORTX-33148] add MotrGC, MotrGC::GCWorker infra code (Seagate#356)

* rgw_sal_motr, motr_gc: [CORTX-33148] add MotrGC, MotrGC::GCWorker infra code

Behaviour
- With Garbage Collector enabled, MotrGC will have GC indexes & GC worker threads.
- GC worker threads will run for the configured max processing time and then
   will wait for the configured time between two consecutive runs.

Additions/Changes
- Add the Garbage Collector infrastructure to support the start & stop of worker threads.
  - MotrGC class with the interfaces to initialize(), start(), stop() and finalize().
  - GCWorker class with entry() and stop() methods.
- Refactor Initialization of MotrStore
  - add setter methods to configure MotrStore
 - add initialize() method to call initialization of all the other components
   eg. MetadataCache, GC, (in future LC, QuotaHandler), etc.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* rgw: [CORTX-33179] GC Metadata Implementation (Seagate#363)

Implement GC metadata structure & corresponding functions

Added motr_gc_obj_info structure to hold gc metadata for an object marked for deletion.
Added logic for creating GC indices based on config parameters.

Signed-off-by: Jeet Jain <jeet.jain@seagate.com>

* GC thread processing logic (Seagate#371)

The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>

* motr_sync: [CORTX-33691] Define and implement rgw_motr synchronization (Seagate#373)

* rgw_sal_motr: [CORTX-33691] Defines abstract synchronization primitives
and implements it for Motr GC across multiple RGW instances.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* motr_sync_impl: [CORTX-33691] update lock() & remove_lock() methods

Update and refactor the MotrLock::lock() and MotrKVLockProvider::remove_lock()
methods.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

Co-authored-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* rgw_sal_motr, motr_gc: [CORTX-32689] Implement MotrGC::enqueue() (Seagate#379)

* rgw_sal_motr, motr_gc: [CORTX-32689] Implement MotrGC::enqueue()

* Push {0_ObjTag: motr_gc_obj_info} and {1_ExpiryTime: motr_gc_obj_info}
  entry to the gc queues, i.e. motr dix.
* Call gc->enqueue() method on simple object delete request without
  actually deleting the obj.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* motr_gc: [CORTX-32689] Implement MotrGC::list() function

MotrGC::list() goes through every gc queue and lists the adds the
pending delete requests in resultant vector.
Interface to list objs using admin tool or rest api's is yet
to be developed.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* motr_sync: [CORTX-33853] Support race coditions during lock acquisition.

Changed lock() implementation to avoid multiple KV operations, thereby
reducing the effect of race during lock() call by caller.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* motr_sync: [CORTX-33853] Support race coditions during lock acquisition.

- Changed lock() implementation to avoid multiple KV operations, thereby
reducing the effect of race during lock() call by caller.
- Added check_lock() to reconfirm the lock by caller.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

Co-authored-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>
Co-authored-by: Jeet Jain <jeet.jain@seagate.com>
Co-authored-by: Sachin Punadikar <sachin.punadikar@seagate.com>
DPG17 pushed a commit to DPG17/cortx-rgw that referenced this pull request Aug 11, 2022
The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>
shriya-deshmukh pushed a commit to shriya-deshmukh/cortx-rgw that referenced this pull request Aug 19, 2022
The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>
shriya-deshmukh pushed a commit to shriya-deshmukh/cortx-rgw that referenced this pull request Aug 19, 2022
…on. (Seagate#385)

* rgw_sal_motr, motr_gc: [CORTX-33148] add MotrGC, MotrGC::GCWorker infra code (Seagate#356)

* rgw_sal_motr, motr_gc: [CORTX-33148] add MotrGC, MotrGC::GCWorker infra code

Behaviour
- With Garbage Collector enabled, MotrGC will have GC indexes & GC worker threads.
- GC worker threads will run for the configured max processing time and then
   will wait for the configured time between two consecutive runs.

Additions/Changes
- Add the Garbage Collector infrastructure to support the start & stop of worker threads.
  - MotrGC class with the interfaces to initialize(), start(), stop() and finalize().
  - GCWorker class with entry() and stop() methods.
- Refactor Initialization of MotrStore
  - add setter methods to configure MotrStore
 - add initialize() method to call initialization of all the other components
   eg. MetadataCache, GC, (in future LC, QuotaHandler), etc.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* rgw: [CORTX-33179] GC Metadata Implementation (Seagate#363)

Implement GC metadata structure & corresponding functions

Added motr_gc_obj_info structure to hold gc metadata for an object marked for deletion.
Added logic for creating GC indices based on config parameters.

Signed-off-by: Jeet Jain <jeet.jain@seagate.com>

* GC thread processing logic (Seagate#371)

The GC thread will aquire GC index and process the object entries for
deletion either upto the count governed by "rgw_gc_max_trim_chunk" or
time allowed by "rgw_gc_processor_max_time".

Signed-off-by: Sachin Punadikar <sachin.punadikar@seagate.com>

* motr_sync: [CORTX-33691] Define and implement rgw_motr synchronization (Seagate#373)

* rgw_sal_motr: [CORTX-33691] Defines abstract synchronization primitives
and implements it for Motr GC across multiple RGW instances.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* motr_sync_impl: [CORTX-33691] update lock() & remove_lock() methods

Update and refactor the MotrLock::lock() and MotrKVLockProvider::remove_lock()
methods.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

Co-authored-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* rgw_sal_motr, motr_gc: [CORTX-32689] Implement MotrGC::enqueue() (Seagate#379)

* rgw_sal_motr, motr_gc: [CORTX-32689] Implement MotrGC::enqueue()

* Push {0_ObjTag: motr_gc_obj_info} and {1_ExpiryTime: motr_gc_obj_info}
  entry to the gc queues, i.e. motr dix.
* Call gc->enqueue() method on simple object delete request without
  actually deleting the obj.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* motr_gc: [CORTX-32689] Implement MotrGC::list() function

MotrGC::list() goes through every gc queue and lists the adds the
pending delete requests in resultant vector.
Interface to list objs using admin tool or rest api's is yet
to be developed.

Signed-off-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>

* motr_sync: [CORTX-33853] Support race coditions during lock acquisition.

Changed lock() implementation to avoid multiple KV operations, thereby
reducing the effect of race during lock() call by caller.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

* motr_sync: [CORTX-33853] Support race coditions during lock acquisition.

- Changed lock() implementation to avoid multiple KV operations, thereby
reducing the effect of race during lock() call by caller.
- Added check_lock() to reconfirm the lock by caller.

Signed-off-by: Dattaprasad Govekar <dattaprasad.govekar@seagate.com>

Co-authored-by: Sumedh Anantrao Kulkarni <sumedh.a.kulkarni@seagate.com>
Co-authored-by: Jeet Jain <jeet.jain@seagate.com>
Co-authored-by: Sachin Punadikar <sachin.punadikar@seagate.com>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants