-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCHANGELOG_partitioned_array.txt
More file actions
102 lines (89 loc) · 6.23 KB
/
CHANGELOG_partitioned_array.txt
File metadata and controls
102 lines (89 loc) · 6.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# VERSION v1.2.7 - added efficiency to PartitionedArray#add
# * starting on line 326 of partitioned_array.rb
#save_all_to_files! # save the data to the files -- superceded by save_partition_to_file! below
# ...
# WTF!? This is a bug! It should be saving the partition that was just added, not all of them!
partition_id = get_partition_id(element_index)
save_partition_to_file!(partition_id) # save the data to the files; needs to be optimized
# VERSION: v1.2.6 - cleanup; plan on being able to save @data_arr to file directly (not by partitions) - 10/19/2022 2:03PM
# VERSION v1.2.5a - endless add implementation in ManagedPartitionedArray#endless_add
# Allows the database to continuously add and allocate, as if it were a plain PartitionedArray
# VERSION v1.2.4 - now its not "data_arr_size" if you set the variable correctly
# Note: The struct may require more work, but this struct in particular is not necessary in the managed partitioned array
# -- too many allocations are done when 'at capacity', but its because of the nature of the beast
# VERSION v1.2.4 - fixed a bug with allocations, also modified in ManagedPartitionedArray
# VERSION v1.2.3 - fully functional in tandem with ManagedPartitionedArray; added a few more tests (9/13/2022 - 5:48am)
# VERSION v1.2.2 - after adding partitions, every partition is saved to reflect the new changes on disk
# VERSION v1.2.1 - fixed PartitionedArray#get(id, &block) bugs
# - file cleanup
# VERSION v1.2.0 - Cleanup according to rubocop and solargraph linter; clarification in places added (8/11/2022 - 6:01am)
# VERSION v1.1.1 - Documenting code and scanning for bugs and any version wrap-ups
# - v1.1.2 - PartitionedArray#add(return_added_element_id: true, &block): return element id of the location of the addition
# VERSION v1.1.0a (8/11/2022 - 5:11am)
# -- PartitionedArray#add_partition now works correctly.
# Various bug fixes that lead to array variable inconsistencies
# VERSION v1.0.5a (7/30/2022)
# -- So far the partitioned array works with allocation of partitions, saving to files, and loading from files.
# PROBLEM/BUG: PartitionedArray#add_partition does not allocate and manage the variables correctly
# IT: upon the need to add a new partition, it adds but the entry is added to the end of the @data_arr
# partition, extending its length by one which is not what we want.
# VERSION v1.0.5 (7/30/2022)
# More bug fixes, notable in saving and loading data from files.
# Example:
# partition0: [{"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World"}]
# partition1: [{"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World"}, {"log"=>"Hello World", :log=>"Hello World"}]
# partition2: [{}, {}, {}, {}, {}]S
# partition3: [{}, {}, {}, {}, {}]
# partition4: [{}, {}, {}, {}, {}]
# partition0 is the length that the partitions should be in this case, p_1 had an entry appended to itself somehow, and
# PartitionedArray won't add any more entries to it, once it reaches its max and has an additional element added.
# VERSION v1.0.4 (7/30/2022 9:37PM)
# Various bug fixes and improvements.
# PartitionedArray#load_from_files! now works without throwing nil entries.
# VERSION v1.0.3 (7/30/2022 2:42PM)
# Added ManagedPartitionedArray for CGMFS, which inherits from PartitionedArray and adds the following functionality:
# - last_entry
# => last_entry is a variable that keeps track of the last entry that was added to the database, in terms of a @data_arr
# since PartitionedArray is dynamically allocated, it is not possible to know the last entry that was added to the database
# VERSION v1.0.2a
# All necessary instance methods have been implemented, ready for real world testing...
# Ranged binary search, for use in CGMFS
# array_id = relative_id - db_size * (PARTITION_AMOUNT + 1)
# When checking and adding, see if the index searched for in question
# when starting out with the database project itself, check to see if the requested id is a member of something like rel_arr
# 1) allocate range_arr and get the DB running
# 2) allocate rel_arr based on range_arr
# 3) allocate the actual array (@data_arr)
# VERSION: v1.0.2
# VERSION: v1.0.1a - set_partition_subelement
# VERSION: v1.0.0 - all essential functions implemented
# 5/9/20 - 5:54PM
# TODO:
# def save_partition_element_to_file!(partition_id, element_id, db_folder: @db_folder)
# VERSION: v1.0.0 (2022/03/30 - 3:46PM)
# Implemented all the necessary features for the PA to work, except for an add_from_lefr or add_from_right, which will
# attempt to fill in the gaps in the database.
# TODO: implement pure json parsing
# * Notes: Have to manually convert all the string data to their proper data structure
# * HURDLE: converting strings to their proper data structures is non-trivial; could check stackoverflow for a solution
# VERSION v2.0 (4/22/2022) - added PartitionedArray#add(&block) function, to make additions to the array fast (fundamental method)
# VERSION v0.6 (2022/03/30) - finished functions necessary for the partitioned array to be useful
# VERSION: v0.5 (2022/03/14)
# Implemented
# PartitionedArray#get_part(partition_id) # => returns the partition specified by partition_id or nil if it doesn't exist
# PartitionedArray#add_part(void) # => adds a partition to the array, bookkeeping is done in the process
# VERSION: v0.4 (11:55PM)
# Fixed bugs, fixed array_id; allocate and get are fully implemented and working correctly for sure
# VERSION: v0.3 (3:46PM)
# allocate and get(id) are seemingly fully implemented and working correctly
# * start work on "allocate_file!"
# VERSION: v0.2 (02.28/2022 3:10PM)
# Currently working on get(id).
# VERSION: v0.1 (12/9/2021 12:31AM)
# Implementing allocate
# SYNOPSIS: An array system that is partitioned at a lower level, but functions as an almost-normal array at the high level
# DESCRIPTION:
# This is a system that is designed to be used as a database, but also as a normal array.
# NOTES:
# When loading a JSON database file (*_db.json), the related @ arr variables need to be set to what is within the JSON file database.
# This means the need to parse a file, and @allocated is set to true in the end.