Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 1f79f11

Browse files
CORTX-33703: Codacy code cleanup (#2035)
Following warning was fixed : Warn when the spacing between a list item’s bullet and its content violates. Signed-off-by: Pratik Patil <[email protected]>
1 parent cfd9b16 commit 1f79f11

File tree

10 files changed

+204
-195
lines changed

10 files changed

+204
-195
lines changed

doc/ADDB_Monitoring.md

Lines changed: 65 additions & 64 deletions
Large diffs are not rendered by default.

doc/CORTX-MOTR-ARCHITECTURE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
+ extension interface
4747
+ flexible transactions
4848
+ open source
49-
+ Portable: runs in user space on any version of Linux
49+
+ Portable: runs in user space on any version of Linux
5050

5151
# Data flow S3
5252
+ cortx rpc: uses RDMA when available (requires kernel module)
@@ -86,14 +86,14 @@
8686
+ Fast scalable repairs of device failure.
8787
+ There are other layouts: composite.
8888

89-
# Index Layout
89+
# Index Layout
9090
+ An index is a container of key-value pairs:
9191
+ GET(key) -> val, PUT(key, val), DEL(key), NEXT(key) -> (key, val)
9292
+ used to store meta-data: (key: "/etc/passwd:length", value: 8192)
9393
+ Uses network raid with parity de-clustering (same as objects), but only N = 1, in N + K + S
9494
+ X-way replication (N = 1, K = X - 1), each key is replicated independently
9595
+ takes hardware topology into account (for free!)
96-
+ fast scalable repair (for free!)
96+
+ fast scalable repair (for free!)
9797

9898
![image](./Images/7_Index_Layout.png)
9999

@@ -129,7 +129,7 @@
129129
+ One of the most complex CORTX components
130130
+ Scalable efficient transactions are hard
131131
+ fortunately not everything is needed at once
132-
+ staged implementation: DTM0 first
132+
+ staged implementation: DTM0 first
133133

134134
![image](./Images/10_DTM.png)
135135

@@ -255,5 +255,4 @@
255255
+ combine workloads
256256
![image](./Images/15_ADDB_Advanced_Use_Case.png)
257257

258-
# Questions
259-
258+
# Questions

doc/End-to-end-Data-Integrity.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Motr end-to-end Data Integrity
22
## Design Highlights
3-
+ Data of each target is divided into blocks of 4096 bytes.
4-
+ Checksum and tags of 64-bit each for these blocks are computed at m0t1fs and sent over wire.
5-
+ Checksum for data blocks is computed based on checksum algorithm selected from configuration.
6-
+ Data integrity type and operations are initialized in m0_file.
7-
+ Using do_sum(), checksum values are computed for each block of data and using do_chk(), checksum values are verified.
3+
+ Data of each target is divided into blocks of 4096 bytes.
4+
+ Checksum and tags of 64-bit each for these blocks are computed at m0t1fs and sent over wire.
5+
+ Checksum for data blocks is computed based on checksum algorithm selected from configuration.
6+
+ Data integrity type and operations are initialized in m0_file.
7+
+ Using do_sum(), checksum values are computed for each block of data and using do_chk(), checksum values are verified.
88

99
![image](./Images/Write.PNG)
1010

1111
![image](./Images/Read.PNG)
1212

1313
## Current Status
1414
### Completed
15-
+ Di is computed at m0t1fs and sent over wire.
16-
+ After receiving write fop, checksum is recomputed and verified at the IO service.
15+
+ Di is computed at m0t1fs and sent over wire.
16+
+ After receiving write fop, checksum is recomputed and verified at the IO service.
1717
### In progress
18-
+ In be segment block attributes m0_be_emap_seg:ee_battr is added. The m0_be_emap_seg:ee_val and ee_battr (When b_nob > 0) are stored in btree.
19-
+ Emap split for di data.
20-
+ Write di data to extents while storing the data in disks (uses be_emap_split and in place btree insert api’s).
21-
+ Read di data from extents while reading data from disks and verify checksum.
22-
+ In sns while reading data units, verify checksum and while writing, store di data.
18+
+ In be segment block attributes m0_be_emap_seg:ee_battr is added. The m0_be_emap_seg:ee_val and ee_battr (When b_nob > 0) are stored in btree.
19+
+ Emap split for di data.
20+
+ Write di data to extents while storing the data in disks (uses be_emap_split and in place btree insert api’s).
21+
+ Read di data from extents while reading data from disks and verify checksum.
22+
+ In sns while reading data units, verify checksum and while writing, store di data.

doc/Seagate-FDMI-Design-Notes.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The processing is to be done on an incoming FOL record against the Filter set. T
1515
Filter Store is to be filled in by means of Subscription API. Filter Index is updated internally on adding Filter.
1616

1717
Currently 2 options for Plug-in architecture are anticipated:
18-
1. Option 1: FDMI-Plug-in. Each plug-in is linked with FDMI making use of internal FDMI API only (some callback, for instance). See Fig.1
19-
1. Option 2: FDMI Plug-in transforms to Mero Core Plug-in. Mero core in this case most likely provides limited features for RPC only. Mero RPC is used to collect notifications from all Mero instances.
18+
1. Option 1: FDMI-Plug-in. Each plug-in is linked with FDMI making use of internal FDMI API only (some callback, for instance). See Fig.1
19+
1. Option 2: FDMI Plug-in transforms to Mero Core Plug-in. Mero core in this case most likely provides limited features for RPC only. Mero RPC is used to collect notifications from all Mero instances.
2020

2121
## Plug-in API
2222

@@ -25,8 +25,8 @@ The API is to allow the plug-ins making use of FDMI to register with the latter
2525
Besides, plug-in may additionally inform FDMI about its specifics, like FOL type it is to process, optimization/tweak requirements (e.g. no batching), etc.
2626

2727
Public Entries:
28-
* Initialize plug-in
29-
* <..>
28+
* Initialize plug-in
29+
* <..>
3030

3131
**N.B.** Plug-in API design details depend on selected architecture option 1 or 2.
3232

@@ -49,18 +49,18 @@ Failure results in dropping current FOL copy
4949
For both options FOLs are fed to Filer Processor the same way: locally.
5050

5151
Public Entries:
52-
* <..>
53-
* <..>
52+
* <..>
53+
* <..>
5454

5555

5656
## Subscription API
5757

5858
The API is to provide a way for adding Filter rules to FDMI instances, identifying FOL processing traits as well as associating Filter with Consumer
5959

6060
Public Entries:
61-
* Register Filter
62-
* Unregister Filter
63-
* <..>
61+
* Register Filter
62+
* Unregister Filter
63+
* <..>
6464

6565
## Notification API
6666

@@ -74,17 +74,17 @@ Option 2, Filter Processor always sends a Notification to Consumer using Mero RP
7474

7575
Public Entries:
7676

77-
* <..>
77+
* <..>
7878

79-
* <..>
79+
* <..>
8080

8181
## Assumptions
8282

8383
### Filter
8484

8585
Filter identifies:
86-
* Consumer to be notified
87-
* Conditions FOL to meet
86+
* Consumer to be notified
87+
* Conditions FOL to meet
8888
The index format: TBD
8989

9090
Filter once registered will be eventually spread across the whole number of Cluster nodes running FDMI services.
@@ -94,8 +94,8 @@ The number of Filters registered in Mero Cluster is expected to be of no explici
9494
### Filter semantics
9595

9696
Filter syntax need to remain flexible to adopt any future improvements/enhancements, but fully covering initial requirements of multi-type support and human readability. Possible options are:
97-
* Native-language-like syntax (SQL-like)
98-
* Symbolic object notation, easily parsed (some standard adherent notation preferred), easily extensible, including object nesting, e.g. JSON (current DSR’s choice)
97+
* Native-language-like syntax (SQL-like)
98+
* Symbolic object notation, easily parsed (some standard adherent notation preferred), easily extensible, including object nesting, e.g. JSON (current DSR’s choice)
9999

100100
NB: Filter being parsed on ingestion may be transformed to a combination of elementary rules in case the transformation does not change Filter semantics but potentially improves Processor performance (decomposition is being performed)
101101

doc/outdated/Containers.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,29 @@ This document summarizes container discussions in the Motr architecture team. Th
44
Container is a low level abstraction that insulates higher Motr layers of the knowledge of storage device addresses (block numbers). The bulk of data and meta-data is stored in containers.
55

66
# Items
7-
+ A container is a storage for data or meta-data. There are several types of container: data container, meta-data container, possibly others.
8-
9-
+ A container provides a very simple interface: it has an internal namespace consisting of keys and provides methods to fetch and update records stored at a given key. Nomenclature of keys and constraints on record structure depend on container type. For data container, keys are logical page offsets and records are simply pages full of data without any internal structure. For meta-data container keys are opaque identifiers of meta-data records.
10-
+ A container stores its contents in a backing store---a storage device. A container allocates space from its backing store and returns no longer used space back as necessary.
11-
+ Local RAID is implemented by using a collection of containers to stripe data across. Note that local RAID is not implemented in the containers layer to avoid cyclic dependency between layers: the data structures (specifically layouts) that local RAID implementation is required to share with SNS are interpreted by Motr back-end that itself uses containers to store its data.
12-
+ Snapshots. Containers are used for data and meta-data snap shotting. When a local snapshot is made as a part of object or system level snap shotting, a container involved into the snapshot is COW-ed, so that all updates are re-directed to a new container.
13-
+ After a container is COW-ed no update should ever touch the blocks of the read-only primary container. This is a necessary prerequisite of a scalable fsck implementation, that will achieve reasonable confidence in system consistency by background scan and check of periodically taken global snapshots.
14-
15-
+ Migration. A container (either read-only or read-write) can migrate to another node. Typical scenarios of such migration are bulk re-integration of updates from a proxy-server to a set of primary servers and moving snapshots.
16-
17-
+ To make migration efficient, a container must be able to do a fast IO of its contents to another node. Specifically, it should be possible to send container contents over network without iterating through individual container records. This condition also implies that a container allocates space from its backing store in a relatively large contiguous chunks.
18-
Self-identification. A container has an identity that is stored in the container and migrated together with the container. Higher layers address container records by (container-id, key) pairs and such addresses remain valid across container migrations, including "migration" where a hard drive is pulled out of one server and inserted into another. In the latter case the system must be able to determine what containers were moved between nodes and update configuration respectively, also it should able determine whether any storage or layout invariants were violated, e.g., whether multiple units of the same parity group are now located on the same server.
19-
+ Layouts. Higher layers address and locate data and meta-data through container identifiers and container keys. On the other hand, a layout produces a location of a given piece of data or meta-data. Together this means that lowest level layouts produce locations in the form of (container-id, key) pairs.
20-
+ A container can be merged into another container. Inclusion of one container into another can be done administrative reasons, to efficiently migrate a large number of smaller containers or for some other purpose. On inclusion, a container retains its identity (does it? Losing identity would require updating (and, hence, tracking) all references).
21-
+ Fids. A fid (file identifiers) is an immutable globally and temporally unique file identifier. As file meta-data record ("inode") is stored in some container, it's logical to use (container-id, key) address of this record as fid. Note that this is formally quite similar to the structure of Lustre fid, composed of a sequence identifier and offset within the sequence.
22-
+ CLDB. A method is required to resolve container addresses to node identifiers. This method should work while containers migrate between nodes and merge with each other. Container Location Data-Base (CLDB) is a distributed data-base tracking containers in the cluster. This database is updated transactionally on container migrations and merges (and splits? There must be splits for symmetry.). Note that CLDB supersedes Fid Location Data-Base (FLDB), see above on fids.
23-
+ Data integrity. A container is a possible place to deal with data integrity issues. Alternatively this can be relegated to lower levels (self-checking device pairs) or higher levels (DMU-like file system with check-sums in meta-data).
7+
+ A container is a storage for data or meta-data. There are several types of container: data container, meta-data container, possibly others.
8+
9+
+ A container provides a very simple interface: it has an internal namespace consisting of keys and provides methods to fetch and update records stored at a given key. Nomenclature of keys and constraints on record structure depend on container type. For data container, keys are logical page offsets and records are simply pages full of data without any internal structure. For meta-data container keys are opaque identifiers of meta-data records.
10+
11+
+ A container stores its contents in a backing store---a storage device. A container allocates space from its backing store and returns no longer used space back as necessary.
12+
13+
+ Local RAID is implemented by using a collection of containers to stripe data across. Note that local RAID is not implemented in the containers layer to avoid cyclic dependency between layers: the data structures (specifically layouts) that local RAID implementation is required to share with SNS are interpreted by Motr back-end that itself uses containers to store its data.
14+
15+
+ Snapshots. Containers are used for data and meta-data snap shotting. When a local snapshot is made as a part of object or system level snap shotting, a container involved into the snapshot is COW-ed, so that all updates are re-directed to a new container.
16+
17+
+ After a container is COW-ed no update should ever touch the blocks of the read-only primary container. This is a necessary prerequisite of a scalable fsck implementation, that will achieve reasonable confidence in system consistency by background scan and check of periodically taken global snapshots.
18+
19+
+ Migration. A container (either read-only or read-write) can migrate to another node. Typical scenarios of such migration are bulk re-integration of updates from a proxy-server to a set of primary servers and moving snapshots.
20+
21+
+ To make migration efficient, a container must be able to do a fast IO of its contents to another node. Specifically, it should be possible to send container contents over network without iterating through individual container records. This condition also implies that a container allocates space from its backing store in a relatively large contiguous chunks.
22+
Self-identification. A container has an identity that is stored in the container and migrated together with the container. Higher layers address container records by (container-id, key) pairs and such addresses remain valid across container migrations, including "migration" where a hard drive is pulled out of one server and inserted into another. In the latter case the system must be able to determine what containers were moved between nodes and update configuration respectively, also it should able determine whether any storage or layout invariants were violated, e.g., whether multiple units of the same parity group are now located on the same server.
23+
24+
+ Layouts. Higher layers address and locate data and meta-data through container identifiers and container keys. On the other hand, a layout produces a location of a given piece of data or meta-data. Together this means that lowest level layouts produce locations in the form of (container-id, key) pairs.
25+
26+
+ A container can be merged into another container. Inclusion of one container into another can be done administrative reasons, to efficiently migrate a large number of smaller containers or for some other purpose. On inclusion, a container retains its identity (does it? Losing identity would require updating (and, hence, tracking) all references).
27+
28+
+ Fids. A fid (file identifiers) is an immutable globally and temporally unique file identifier. As file meta-data record ("inode") is stored in some container, it's logical to use (container-id, key) address of this record as fid. Note that this is formally quite similar to the structure of Lustre fid, composed of a sequence identifier and offset within the sequence.
29+
30+
+ CLDB. A method is required to resolve container addresses to node identifiers. This method should work while containers migrate between nodes and merge with each other. Container Location Data-Base (CLDB) is a distributed data-base tracking containers in the cluster. This database is updated transactionally on container migrations and merges (and splits? There must be splits for symmetry.). Note that CLDB supersedes Fid Location Data-Base (FLDB), see above on fids.
31+
32+
+ Data integrity. A container is a possible place to deal with data integrity issues. Alternatively this can be relegated to lower levels (self-checking device pairs) or higher levels (DMU-like file system with check-sums in meta-data).

doc/trace.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ User-space
134134

135135
Subsystem filtering is controlled in two ways:
136136

137-
1. environment variable:
137+
1. environment variable:
138138

139139
$ export M0_TRACE_IMMEDIATE_MASK='!rpc'
140140
$ ./utils/ut.sh
141141

142-
2. CLI options for utils/ut:
142+
2. CLI options for utils/ut:
143143

144144
-m string: trace mask, either numeric (HEX/DEC) or comma-separated
145145
list of subsystem names, use ! at the beginning to invert
@@ -153,12 +153,12 @@ Subsystem filtering is controlled in two ways:
153153

154154
Trace levels:
155155

156-
1. environment variable:
156+
1. environment variable:
157157

158158
export M0_TRACE_LEVEL=debug
159159
./utils/ut.sh
160160

161-
2. CLI options for utils/ut:
161+
2. CLI options for utils/ut:
162162

163163
-e string: trace level: level[+][,level[+]] where level is one of
164164
call|debug|info|warn|error|fatal
@@ -170,12 +170,12 @@ Trace levels:
170170

171171
Trace print context:
172172

173-
1. environment variable:
173+
1. environment variable:
174174

175175
export M0_TRACE_PRINT_CONTEXT=none
176176
./utils/ut.sh
177177

178-
2. CLI options for utils/ut:
178+
2. CLI options for utils/ut:
179179

180180
-p string: trace print context, values: none, func, short, full
181181

doc/workarounds.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
List of workarounds for third-party libraries and external dependencies
22
=======================================================================
33

4-
* `sem_timedwait(3)` from _glibc_ on _Centos_ >= 7.2
4+
* `sem_timedwait(3)` from _glibc_ on _Centos_ >= 7.2
55

66
**Problem**: `sem_timedwait(3)` returns `-ETIMEDOUT` immediately if `tv_sec` is
77
greater than `gettimeofday(2) + INT_MAX`, that makes `m0_semaphore_timeddown(M0_TIME_NEVER)`
@@ -17,10 +17,10 @@ List of workarounds for third-party libraries and external dependencies
1717
**Source**: `lib/user_space/semaphore.c: m0_semaphore_timeddown()`
1818

1919
**References**:
20-
- [CASTOR-1990: Different sem_timedwait() behaviour on real cluster node and EC2 node](https://jts.seagate.com/browse/CASTOR-1990)
21-
- [Bug 1412082 - futex_abstimed_wait() always converts abstime to relative time](https://bugzilla.redhat.com/show_bug.cgi?id=1412082)
20+
- [CASTOR-1990: Different sem_timedwait() behaviour on real cluster node and EC2 node](https://jts.seagate.com/browse/CASTOR-1990)
21+
- [Bug 1412082 - futex_abstimed_wait() always converts abstime to relative time](https://bugzilla.redhat.com/show_bug.cgi?id=1412082)
2222

23-
* `sched_getcpu(3)` on KVM guest
23+
* `sched_getcpu(3)` on KVM guest
2424

2525
**Problem**: `sched_getcpu(3)` can return 0 on a KVM guest system regardless of cpu number.
2626

@@ -31,4 +31,4 @@ List of workarounds for third-party libraries and external dependencies
3131
**Source**: `lib/user_space/processor.c processor_getcpu_init()`
3232

3333
**References**:
34-
- [MOTR-2500: Motr panic: (locality == m0_locality_here()) at m0_locality_chores_run()](https://jts.seagate.com/browse/MOTR-2500)
34+
- [MOTR-2500: Motr panic: (locality == m0_locality_here()) at m0_locality_chores_run()](https://jts.seagate.com/browse/MOTR-2500)

0 commit comments

Comments
 (0)