KR20220106622A - Zipper compaction method and apparatus for compacting the plural of skiplists - Google Patents

Zipper compaction method and apparatus for compacting the plural of skiplists Download PDF

Info

Publication number
KR20220106622A
KR20220106622A KR1020210009759A KR20210009759A KR20220106622A KR 20220106622 A KR20220106622 A KR 20220106622A KR 1020210009759 A KR1020210009759 A KR 1020210009759A KR 20210009759 A KR20210009759 A KR 20210009759A KR 20220106622 A KR20220106622 A KR 20220106622A
Authority
KR
South Korea
Prior art keywords
skip list
node
skip
zipper
merging
Prior art date
Application number
KR1020210009759A
Other languages
Korean (ko)
Other versions
KR102568662B1 (en
Inventor
남범석
김동의
박찬열
Original Assignee
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 성균관대학교산학협력단 filed Critical 성균관대학교산학협력단
Priority to KR1020210009759A priority Critical patent/KR102568662B1/en
Publication of KR20220106622A publication Critical patent/KR20220106622A/en
Application granted granted Critical
Publication of KR102568662B1 publication Critical patent/KR102568662B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Abstract

The present invention relates to a zipper compaction method and apparatus for merging a plurality of skiplists. According to one embodiment of the present invention, the zipper compaction method for merging the plurality of skiplists includes: a scanning step of storing position information in a stack in order by finding a position to insert a node of a first skiplist into a second skiplist from a head to a tail in order; and a step of merging the node of the first skiplist from the tail to the head in the second skiplist in order by using the stored position information.

Description

복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법 및 장치{ZIPPER COMPACTION METHOD AND APPARATUS FOR COMPACTING THE PLURAL OF SKIPLISTS}ZIPPER COMPACTION METHOD AND APPARATUS FOR COMPACTING THE PLURAL OF SKIPLISTS

본 발명은 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법 및 장치에 관한 것이다.The present invention relates to a zipper compaction method and apparatus for merging a plurality of skip lists.

지퍼 데이터베이스(ZipperDB)는 영구 메모리(Persistent Memory, PM)의 높은 읽기/쓰기 성능(read/write performance)과 바이트 접근성(byte-addressability)을 이용하여 읽기 증폭(Write amplification)과 쓰기 중단(write stall) 문제를 줄이도록 디자인되었다. ZipperDB uses the high read/write performance and byte-addressability of Persistent Memory (PM) for read amplification and write stall. It is designed to reduce problems.

지퍼 데이터베이스는 여러 개의 PM 풀세트(PM poolset)로 구성되어 있으며 각각의 풀(Pool)에는 여러 개의 레벨(Level)이 존재한다. 지퍼 데이터베이스는 SSTable(Sorted-String Table) 대신 스킵리스트(skiplist)로 데이터를 저장하며, 각각의 레벨은 하나의 영구 스킵리스트(persistent skiplist)로 이루어져 있다. 스킵리스트는 검색, 추가, 제거를 수행할 수 있는 정렬된 자료 구조를 나타낸다. 스킵리스트는 이진 검색 트리를 대체할 수 있으며, 스킵 포인터를 사용해서 빠르게 탐색할 수 있다. 각각의 영구 스킵리스트(persistent skiplist)는 libpmemobj를 통해 구현되었으며, 기존의 파일 메타데이터를 관리하는 메니페스트(manifest) 대신 각 레벨의 포인터를 가지고 있다.The zipper database consists of several PM poolsets, and several levels exist in each pool. Zipper database stores data as skiplists instead of SSTables (Sorted-String Tables), and each level consists of one persistent skiplist. A skiplist represents an ordered data structure that can be searched, added, or removed. Skiplists can replace binary search trees, and can be quickly traversed using skip pointers. Each persistent skiplist is implemented through libpmemobj, and has a pointer to each level instead of a manifest that manages the existing file metadata.

본 발명의 실시예들은 복수의 스키리스트를 하나로 병합하기 위한, 지퍼 컴팩션 방법 및 장치를 제공하고자 한다.Embodiments of the present invention are intended to provide a zipper compaction method and apparatus for merging a plurality of ski lists into one.

본 발명의 실시예들은 복수의 스키리스트를 하나로 병합하는 동안에도 다른 트랜잭션들이 락(Lock)을 잡지 않고 복수의 스킵리스트를 락-프리(Lock-free)로 검색하기 위한, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법 및 장치를 제공하고자 한다.Embodiments of the present invention merge a plurality of skip lists to search a plurality of skip lists in a lock-free manner without other transactions holding a lock even while merging a plurality of ski lists into one To provide a zipper compaction method and apparatus for

다만, 본 발명의 해결하고자 하는 과제는 이에 한정되는 것이 아니며, 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위의 환경에서도 다양하게 확장될 수 있을 것이다.However, the problems to be solved by the present invention are not limited thereto, and may be variously expanded in an environment within the scope not departing from the spirit and scope of the present invention.

본 발명의 일 실시예에 따르면, 지퍼 컴팩션 장치에 의해 수행되는 지퍼 컴팩션 방법에 있어서, 제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하는 스캔 단계; 및 상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는 단계를 포함하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법이 제공될 수 있다. According to an embodiment of the present invention, in a zipper compaction method performed by a zipper compaction device, a position to insert a node of a first skip list into a second skip list sequentially from a head to a tail is found and location information is stored. Scan steps to sequentially store in the stack; and sequentially merging the nodes of the first skip list from the tail to the head into the second skip list using the stored location information. A zipper compaction method for merging a plurality of skip lists can be provided. have.

상기 스캔 단계는, 최하단 계층 포인터를 따라 상기 제1 스킵리스트를 탐색하여 상기 제1 스킵리스트의 노드를 제2 스킵리스트에 삽입할 위치 정보를 스택에 저장할 수 있다. In the scanning step, the first skip list may be searched along the lowest layer pointer, and location information for inserting a node of the first skip list into a second skip list may be stored in a stack.

상기 스캔 단계는, 상기 제1 스킵리스트를 탐색하면서 삽입할 노드에서 각 계층의 포인터가 업데이트가 필요하면, 삽입할 제1 스킵리스트의 노드와 포인터 정보를 스택에 저장할 수 있다. In the scanning step, when the pointer of each layer needs to be updated in the node to be inserted while searching the first skip list, information on the node and the pointer of the first skip list to be inserted may be stored in the stack.

상기 스캔 단계는, 제1 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드를 방문하고 제2 스킵리스트에서 다음 노드를 삽입할 위치를 탐색할 수 있다. In the scanning step, the next node may be visited along the pointer of the lowest layer of the first skip list and a position to insert the next node in the second skip list may be searched.

상기 스캔 단계는, 이전에 검색한 노드의 키 값이 현재에 검색한 노드의 키 값 보다 작으면, 헤드에서부터 검색하는 대신 가장 높은 계층의 이전 노드부터 다시 검색할 수 있다. In the scanning step, if the key value of the previously searched node is smaller than the key value of the currently searched node, the search may be performed again from the previous node of the highest layer instead of searching from the head.

상기 병합하는 단계는, 상기 스택에 저장된 위치 정보를 꺼내어 이용하여 상기 제1 스킵리스트의 노드를 최하단 포인터부터 제2 스킵리스트에 병합 할 수 있다. In the merging step, the node of the first skip list may be merged into the second skip list starting from the lowest pointer by using the location information stored in the stack.

상기 병합하는 단계는, 상기 제1 스킵리스트의 노드의 최하단 계층 포인터를 업데이트한 이후 상기 제1 스킵리스트의 노드의 상위 계층 포인터를 제2 스킵리스트의 노드를 가리키도록 업데이트할 수 있다. In the merging, after updating the lowest layer pointer of the node of the first skip list, the upper layer pointer of the node of the first skip list may be updated to point to the node of the second skip list.

상기 병합하는 단계는, 상기 제1 스킵리스트의 노드의 최상위 계층을 제2 스킵리스트의 꼬리 부분을 가리키도록 업데이트할 수 있다. In the merging, the uppermost layer of the node of the first skip list may be updated to point to the tail of the second skip list.

상기 방법은, 읽기 트랜잭션이 제1 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 읽기 쓰레드는 현재 검색하는 스킵리스트를 제1 스킵리스트로 인지하고, 검색하는 노드를 찾지 못할 경우 병합이 진행중인 또는 병합이 끝난 제2 스킵리스트에서 탐색을 다시 시작하는 단계를 더 포함할 수 있다. In the above method, when the read transaction is temporarily stopped while searching the first skip list and resumes again, the read thread recognizes the currently searched skip list as the first skip list, and if it cannot find the node to be searched for, merging is in progress or The method may further include restarting the search in the merged second skip list.

상기 방법은, 상기 제1 스킵리스트의 모든 노드를 제2 스킵리스트에 병합하면 상기 제1 스킵리스트는 머리 노드와 꼬리 노드만을 가진 빈 스킵리스트가 되어, 상기 제1 스킵리스트를 삭제하는 단계를 더 포함할 수 있다.The method further includes the steps of: when all nodes of the first skip list are merged into a second skip list, the first skip list becomes an empty skip list having only a head node and a tail node, and the step of deleting the first skip list is further performed. may include

한편, 본 발명의 다른 실시예에 따르면, 제1 스킵리스트와 제2 스킵리스트를 저장하는 제1 메모리; 상기 영구 메모리에서 지퍼 컴팩션(Zipper Compaction)과 관련된 하나 이상의 프로그램을 저장하는 제2 메모리; 및 상기 저장된 하나 이상의 프로그램을 실행하는 프로세서를 포함하고, 상기 프로세서는, 상기 제1 메모리에서 제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하고, 상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치가 제공될 수 있다. On the other hand, according to another embodiment of the present invention, a first memory for storing the first skip list and the second skip list; a second memory for storing one or more programs related to a zipper compaction in the permanent memory; and a processor executing the stored one or more programs, wherein the processor searches for a position in the first memory to insert a node of a first skip list into a second skip list sequentially from head to tail, and stacks the location information. A zipper compaction device for merging a plurality of skip lists, sequentially storing in the , and sequentially merging the nodes of the first skip list from the tail to the head into the second skip list using the stored location information can

상기 프로세서는, 최하단 계층 포인터를 따라 상기 제1 스킵리스트를 탐색하여 상기 제1 스킵리스트의 노드를 제2 스킵리스트에 삽입할 위치 정보를 스택에 저장할 수 있다. The processor may search the first skip list along the lowest layer pointer, and store information about a location for inserting a node of the first skip list into a second skip list in a stack.

상기 프로세서는, 상기 제1 스킵리스트를 탐색하면서 삽입할 노드에서 각 계층의 포인터가 업데이트가 필요하면, 삽입할 제1 스킵리스트의 노드와 포인터 정보를 스택에 저장할 수 있다. When the pointer of each layer needs to be updated in the node to be inserted while searching the first skip list, the processor may store information on the node and pointer of the first skip list to be inserted in the stack.

상기 프로세서는, 제1 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드를 방문하고 제2 스킵리스트에서 다음 노드를 삽입할 위치를 탐색할 수 있다. The processor may visit the next node along the pointer of the lowest layer of the first skip list and search for a position to insert the next node in the second skip list.

상기 프로세서는, 이전에 검색한 노드의 키 값이 현재에 검색한 노드의 키 값 보다 작으면, 헤드에서부터 검색하는 대신 가장 높은 계층의 이전 노드부터 다시 검색할 수 있다. If the key value of the previously searched node is smaller than the key value of the currently searched node, the processor may search again from the previous node of the highest hierarchy instead of searching from the head.

상기 프로세서는, 상기 스택에 저장된 위치 정보를 꺼내어 이용하여 상기 제1 스킵리스트의 노드를 최하단 포인터부터 제2 스킵리스트에 병합할 수 있다. The processor may retrieve and use the location information stored in the stack to merge the nodes of the first skip list into the second skip list starting from the lowest pointer.

상기 프로세서는, 상기 제1 스킵리스트의 노드의 최하단 계층 포인터를 업데이트한 이후 상기 제1 스킵리스트의 노드의 상위 계층 포인터를 제2 스킵리스트의 노드를 가리키도록 업데이트할 수 있다. The processor may update the upper layer pointer of the node of the first skip list to point to the node of the second skip list after updating the pointer of the lowest layer of the node of the first skip list.

상기 프로세서는, 상기 제1 스킵리스트의 노드의 최상위 계층을 제2 스킵리스트의 꼬리 부분을 가리키도록 업데이트할 수 있다. The processor may update the uppermost layer of the node of the first skip list to point to the tail of the second skip list.

상기 프로세서는, 읽기 트랜잭션이 제1 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 읽기 쓰레드는 현재 검색하는 스킵리스트를 제1 스킵리스트로 인지하고, 검색하는 노드를 찾지 못할 경우 병합이 진행중인 또는 병합이 끝난 제2 스킵리스트에서 탐색을 다시 시작할 수 있다. The processor, when the read transaction is temporarily stopped while searching the first skip list and resumes again, the read thread recognizes the currently searched skip list as the first skip list, and when a node to be searched is not found, a merge is in progress or Search may be restarted from the second skip list that has been merged.

상기 프로세서는, 상기 제1 스킵리스트의 모든 노드를 제2 스킵리스트에 병합하면 상기 제1 스킵리스트는 머리 노드와 꼬리 노드만을 가진 빈 스킵리스트가 되어, 상기 제1 스킵리스트를 삭제할 수 있다. The processor, when all nodes of the first skip list are merged into a second skip list, the first skip list becomes an empty skip list having only a head node and a tail node, and thus the first skip list may be deleted.

한편, 본 발명의 다른 실시예에 따르면, 프로세서에 의해 실행될 때, 상기 프로세서로 하여금 방법을 실행하게 하는 명령어들을 저장하기 위한 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 방법은: 제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하는 스캔 단계; 및 상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는 단계를 포함하는, 비일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다. Meanwhile, according to another embodiment of the present invention, there is provided a non-transitory computer-readable storage medium for storing instructions that, when executed by a processor, cause the processor to execute a method, the method comprising: a node of a first skip list a scanning step of finding positions to insert into the second skip list sequentially from the head to the tail and sequentially storing the position information in a stack; and sequentially merging the nodes of the first skip list from the tail to the head into the second skip list using the stored location information.

개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology may have the following effects. However, this does not mean that a specific embodiment should include all of the following effects or only the following effects, so the scope of the disclosed technology should not be construed as being limited thereby.

본 발명의 실시예들은 복수의 스키리스트를 하나로 병합할 수 있다. Embodiments of the present invention may merge a plurality of ski lists into one.

본 발명의 실시예들은 복수의 스키리스트를 하나로 병합하는 동안에도 다른 트랜잭션들이 락(Lock)을 잡지 않고 복수의 스킵리스트를 락-프리(Lock-free)로 검색할 수 있다. According to embodiments of the present invention, even while merging a plurality of ski lists into one, other transactions can search a plurality of skip lists in a lock-free manner without holding a lock.

도 1은 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 스캔 과정을 나타낸 도면이다.
도 2 내지 도 8은 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 병합 과정을 나타낸 도면이다.
도 9는 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 지퍼 컴팩션이 완료된 이후의 스킵리스트를 나타낸 도면이다.
도 10은 본 발명의 일 실시예에 따른 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치의 구성도이다.
도 11 및 도 12는 본 발명의 일 실시예에 따른 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법에서의 스캔 단계와 병합 단계에 대한 순서도이다.
1 is a view showing a scanning process in a zipper compaction method according to an embodiment of the present invention.
2 to 8 are views illustrating a merging process in a zipper compaction method according to an embodiment of the present invention.
9 is a diagram illustrating a skip list after zipper compaction is completed in the zipper compaction method according to an embodiment of the present invention.
10 is a block diagram of a zipper compaction apparatus for merging a plurality of skip lists according to an embodiment of the present invention.
11 and 12 are flowcharts of a scanning step and a merging step in a zipper compaction method for merging a plurality of skip lists according to an embodiment of the present invention.

본 발명은 다양한 변환을 가할 수 있고 여러가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 구체적으로 설명하고자 한다. 그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 기술적 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해될 수 있다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.Since the present invention can apply various transformations and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to a specific embodiment, it can be understood to include all transformations, equivalents or substitutes included in the spirit and scope of the present invention. In describing the present invention, if it is determined that a detailed description of a related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들이 용어들에 의해 한정되는 것은 아니다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms such as first, second, etc. may be used to describe various elements, but the elements are not limited by the terms. The terms are used only for the purpose of distinguishing one component from another.

본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 본 발명에서 사용한 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나 이는 당 분야에 종사하는 기술자의 의도, 판례, 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the present invention are only used to describe specific embodiments, and are not intended to limit the present invention. The terms used in the present invention have been selected as currently widely used general terms as possible while considering the functions in the present invention, but these may vary depending on the intention, precedent, or emergence of new technology of those of ordinary skill in the art. In addition, in a specific case, there is a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term and the overall content of the present invention, rather than the name of a simple term.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present invention, terms such as "comprises" or "have" are intended to designate that the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification exist, but one or more other features It is to be understood that this does not preclude the possibility of the presence or addition of numbers, steps, operations, components, parts, or combinations thereof.

이하, 본 발명의 실시예들을 첨부 도면을 참조하여 상세히 설명하기로 하며, 첨부 도면을 참조하여 설명함에 있어, 동일하거나 대응하는 구성요소는 동일한 도면번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, and in the description with reference to the accompanying drawings, the same or corresponding components are given the same reference numerals, and the overlapping description thereof will be omitted. do.

도 1은 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 스캔 과정을 나타낸 도면이다. 1 is a view showing a scanning process in a zipper compaction method according to an embodiment of the present invention.

도 1은 지퍼 컴팩션이 진행될 레벨 K-1의 크기가 작은 스킵리스트와 레벨 K의 크기가 큰 스킵리스트를 보여준다. 레벨 K-1 의 크기가 작은 스킵리스트에는 노드 3, 노드 12 및 노드 14가 포함되고, 레벨 K 의 크기가 큰 스킵리스트에는 노드 7, 노드 10 및 노드 17이 포함된다. 여기서, 크기가 작은 스킵리스트가 크기가 큰 스킵리스트에 병합되는 경우를 가정하여 설명하기로 한다. 병합되는 스킵리스트는 크기로 한정되지 않고, 크기가 작은 스킵리스트가 크기가 큰 스킵리스트에 병합될 수 있다. 이때, 본 발명의 일 실시예에서 크기가 작은 스킵리스트는 제1 스킵리스트로 지정되고, 크기가 큰 스킵리스트는 제2 스킵리스트로 지정된다. 반대로 실시예에서 크기가 큰 스킵리스트는 제1 스킵리스트로 지정되고, 크기가 작은 스킵리스트는 제2 스킵리스트로 지정될 수 있다. 1 shows a skip list having a small size of level K-1 and a skip list having a large size of level K, in which zipper compaction is to be performed. The skiplist having a small size of level K-1 includes node 3, node 12, and node 14, and the skiplist having a large size of level K includes node 7, node 10, and node 17. Here, it is assumed that a skip list having a small size is merged into a skip list having a large size. The merged skip list is not limited in size, and a small skip list may be merged into a large skip list. In this case, according to an embodiment of the present invention, a skip list having a small size is designated as a first skip list, and a skip list having a large size is designated as a second skip list. Conversely, in an embodiment, a skip list having a large size may be designated as a first skip list, and a skip list having a small size may be designated as a second skip list.

먼저, 지퍼 컴팩션 장치는 레벨 K-1 의 크기가 작은 스킵리스트와 레벨 K 의 크기가 큰 스킵리스트에 대한 컴팩션을 하기 위한 스캔 과정을 수행한다. 스캔 과정에서 변경이 필요한 노드는 스택(stack)에 푸시(push)하여 저장한다. 최하단 계층 포인터를 따라 레벨 K-1의 크기가 작은 스킵리스트를 탐색한다. 먼저, 처음 노드(노드 3)가 레벨 K 의 크기가 큰 스킵리스트를 검색하며 삽입할 위치를 찾는다. 또한, 레벨 K의 의 크기가 큰 스킵리스트를 검색하면서 노드 3에서 각 계층의 포인터가 업데이트가 필요한지 확인한다. 여기서 포인터의 값을 당장 변경하지 않고, 스택에 포인터 정보만을 저장한다. 도 1에서 레벨 K 의 크기가 큰 스킵리스트의 H0, H1은 노드 3을 가리키도록 업데이트해야 하기 때문에 노드 3과 함께 H0, H1을 스택에 저장한다. First, the zipper compaction apparatus performs a scan process for compaction of a skip list having a small size of level K-1 and a skip list having a large size of level K-1. Nodes that need to be changed in the scan process are saved by pushing them on the stack. A skip list with a small size of level K-1 is searched along the lowest hierarchical pointer. First, the first node (node 3) searches a skip list with a large size of level K and finds an insertion position. In addition, while searching the skip list having a large size of K of level K, it is checked whether the pointer of each layer needs to be updated in node 3. Here, the value of the pointer is not changed immediately, only the pointer information is stored on the stack. In FIG. 1 , since H0 and H1 of the skip list having a large size of level K need to be updated to point to node 3, H0 and H1 are stored together with node 3 in the stack.

①번 과정 이후, 레벨 K-1의 크기가 작은 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드 12를 방문하고 레벨 K의 크기가 큰 스킵리스트에서 노드 12를 삽입할 위치를 찾는다. 또한, 각 계층에서 노드 12 바로 앞에 위치한 레벨 K의 노드 10은 스택에 노드 12와 함께 저장된다. 위 예에서 R3, R2, R1, R0은 노드 12와 함께 저장된다.After step ①, the next node 12 is visited following the pointer of the lowest layer of the skip list with a small size of level K-1, and a position to insert the node 12 from the skip list with a large size of level K is found. Also, in each layer, node 10 of level K, which is located immediately before node 12, is stored along with node 12 in the stack. In the example above, R3, R2, R1, and R0 are stored with node 12.

②번 과정 이후, 그 다음 노드 12의 최하단 계층 포인터를 따라 노드 14를 방문한다. 여기서 레벨 K-1의 크기가 작은 스킵리스트 노드와 연결될 레벨 K 의 크기가 큰 스킵리스트 노드를 매번 스킵리스트 헤드(head)에서부터 검색할 필요가 없는데, 그 이유는 이전에 검색한 키(12)값이 현재의 키(14)값보다 작기 때문이다. 그렇기 때문에 헤드부터 검색하는 대신 이전의 가장 높은 계층부터 검색을 다시 시작한다. 도 1에서는 노드 14를 검색할 때 레벨 K 의 크기가 큰 스킵리스트의 R3부터 검색을 한다.After step ②, the next node 14 is visited by following the lowest layer pointer of node 12. Here, it is not necessary to search for a skiplist node with a large size of level K to be connected with a skiplist node with a small size of level K-1 from the skip list head every time, because the previously searched key (12) value This is because it is smaller than the current key (14) value. Therefore, instead of searching from the head, the search starts again from the previous highest layer. In FIG. 1 , when searching for node 14, a search is performed from R3 of the skip list having a large size of level K.

도 2 내지 도 8은 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 병합 과정을 나타낸 도면이다. 2 to 8 are views illustrating a merging process in a zipper compaction method according to an embodiment of the present invention.

도 1의 스캔 과정 이후, 지퍼 컴팩션 장치는 병합 과정에서는 스택에서 포인터를 빼내면서 해당 포인터의 업데이트를 진행하며, 스킵리스트의 꼬리부터 머리까지 차례대로 컴팩션을 진행한다.After the scanning process of FIG. 1 , the zipper compaction device updates the corresponding pointer while removing the pointer from the stack during the merging process, and compacts the skip list from the tail to the head in sequence.

도 2의 예시처럼, 노드 14의 최하단 계층의 포인터를 노드 17을 가리키도록 수정하고 clwb(cache line wite back)를 호출하여 지속성을 보장한다(S101). 노드 14의 최하단 계층이 노드 17에 연결되어있는 도 2의 상황에서, 노드 14의 상위 계층 포인터(next[1])는 노드 17을 가리키도록 수정하지 않는다. 이로 인해 검색(search)에 영향을 줄 수도 있을 것으로 생각할 수 있지만, 계층 0을 제외한 나머지 계층들은 다음 노드에 대한 확률적인 지름길이며, 올바른 검색 결과에 영향을 주지 않는다. 그렇기 때문에 계층 0을 제외한 나머지 계층들까지 원자적으로 업데이트할 필요는 없다.As in the example of FIG. 2 , the pointer of the lowest layer of node 14 is modified to point to node 17 and clwb (cache line wite back) is called to ensure persistence (S101). In the situation of FIG. 2 in which the lowest layer of node 14 is connected to node 17, the upper layer pointer (next[1]) of node 14 is not modified to point to node 17. It can be thought that this may affect the search, but the remaining layers except for layer 0 are probabilistic shortcuts to the next node, and do not affect the correct search result. Therefore, it is not necessary to update the remaining layers except for layer 0 atomically.

노드 14의 하단 계층 포인터를 업데이트 한 도 2 이후에 도 3과 같이 노드 14의 상위 계층 포인터를 노드 17을 가리키도록 업데이트한다(S102).After updating the lower layer pointer of node 14, the upper layer pointer of node 14 is updated to point to node 17 as shown in FIG. 3 after FIG. 2 (S102).

이후, 스택에서 다음 노드인 노드 12를 꺼내 포인터를 업데이트한다(S103). 도 4에서 노드 12의 최상위 계층은 레벨 K의 꼬리부분을 가리키고, 그 다음 계층은 노드 17을 가리키도록 업데이트한다.Thereafter, node 12, which is the next node, is taken out from the stack and the pointer is updated (S103). In FIG. 4 , the uppermost layer of node 12 points to the tail of level K, and the next layer is updated to point to node 17 .

이후 과정인 도 5와 도 6에서는 도 4의 과정처럼 각 계층에서 가장 오른쪽에 있는 노드를 업데이트해준다. 도 5에서는 노드 10의 계층 포인터를 노드 12를 가리키도록 업데이트한다(S104 및 S105). 도 6에서는 노드 7의 계층 포인터를 노드 12를 가리키도록 업데이트한다(S106). In subsequent processes of FIGS. 5 and 6 , the rightmost node in each layer is updated as in the process of FIG. 4 . In FIG. 5, the layer pointer of node 10 is updated to point to node 12 (S104 and S105). In FIG. 6, the layer pointer of node 7 is updated to point to node 12 (S106).

다음으로 도 7과 도 8에서와 같이, 스택에서 노드 3을 꺼내고 노드 3의 포인터와 각 계층의 가장 오른쪽 노드를 업데이트한다. 도 7에서는 노드 3의 최하단 포인터를 노드 7을 가리키도록 업데이트하고(S107), 레벨 K 의 크기가 큰 스킵리스트의 H0를 노드 3을 가리키도록 업데이트한다(S108). 그리고 도 8에서는 노드 3의 상단 포인터를 노드 7을 가리키도록 업데이트하고(S107), 레벨 K 스킵리스트의 H1을 노드 3을 가리키도록 업데이트한다(S108). 이후, 레벨 K-1의 헤드 부분은 사용되지 않는다.Next, as in FIGS. 7 and 8 , node 3 is taken out of the stack and the pointer of node 3 and the rightmost node of each layer are updated. In FIG. 7, the lowest pointer of node 3 is updated to point to node 7 (S107), and H0 of the skip list having a large level K is updated to point to node 3 (S108). And in FIG. 8, the upper pointer of node 3 is updated to point to node 7 (S107), and H1 of the level K skip list is updated to point to node 3 (S108). After that, the head part of level K-1 is not used.

도 9는 본 발명의 일 실시예에 따른 지퍼 컴팩션 방법에서 지퍼 컴팩션이 완료된 이후의 스킵리스트를 나타낸 도면이다. 9 is a diagram illustrating a skip list after zipper compaction is completed in the zipper compaction method according to an embodiment of the present invention.

도 9는 지퍼 컴팩션이 완료된 이후의 스킵리스트를 보여준다.9 shows a skip list after zipper compaction is completed.

지퍼 컴팩션 알고리즘에서 사용하는 실패 원자적 8바이트 저장(failure-atomic 8byte store) 명령은 두 개의 스킵리스트를 병합하는 동안에도 동시에 읽기 쓰레드가 올바른 데이터를 찾는 것을 보장한다. 예를 들면, 읽기 쓰레드는 도 1 내지 도 9까지의 그림들에 표현된 어떤 상태의 스킵리스트에 동시에 접근하더라도 올바른 결과를 반환하는 것을 보장한다. The fail-atomic 8-byte store instruction used by the zipper compaction algorithm ensures that the read thread simultaneously finds the correct data while merging two skiplists. For example, the read thread is guaranteed to return a correct result even if it simultaneously accesses the skip list in any state shown in the figures of FIGS. 1 to 9 .

반대로, 백그라운드 컴팩션 쓰레드가 지퍼 컴팩션을 진행하는 동안 읽기 트랜잭션이 일시 중단 되는 경우를 생각해보자. 읽기 트랜잭션이 낮은 레벨인 레벨 K-1의 크기가 작은 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 기존 레벨 K-1의 크기가 작은 스킵리스트는 레벨 K 또는 더 높은 레벨의 크기가 큰 스킵리스트로 컴팩션 되고 있을 수 있다. 이때, 읽기 쓰레드는 중간에 스킵리스트의 레벨이 변경되었는지 알 수 없다. 기존의 방식처럼 읽기 쓰레드가 키(Key)를 검색하면 레벨 K-1, 레벨 K 혹은 그 이상 레벨의 스킵리스트의 꼬리 노드로 이동할 수도 있다. 하지만 읽기 쓰레드는 현재 검색하는 스킵리스트를 레벨 K-1로 인지하고 있기 때문에 레벨 K-1의 검색을 마친 후, 검색하는 노드를 찾지 못했다면, 컴팩션이 진행중인 레벨 K의 스킵리스트에서 탐색을 다시 시작한다. 본 발명의 일 실시예는 읽기 트랜잭션이 이미 방문한 노드를 여러 번 다시 방문할 수도 있긴 하지만, 올바른 검색 결과를 반환하는 것을 보장한다.Conversely, consider a case where a read transaction is suspended while the background compaction thread is performing zipper compaction. If a read transaction is temporarily aborted while searching for a small skiplist of level K-1, which is a low level, and is resumed, the existing skiplist with a small size of level K-1 is a skip list with a large size of level K or a higher level. It may be being compacted into a list. In this case, the read thread cannot know whether the level of the skip list is changed in the middle. As in the conventional method, when a read thread searches for a key, it may move to the tail node of the skip list of level K-1, level K, or higher. However, since the read thread recognizes the skip list it is currently searching for as level K-1, if it does not find the node it is looking for after completing the level K-1 search, it searches again in the level K skip list where compaction is in progress. Start. One embodiment of the present invention ensures that a read transaction returns a correct search result, although it may revisit an already visited node multiple times.

도 10은 본 발명의 일 실시예에 따른 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치의 구성도이다.10 is a block diagram of a zipper compaction apparatus for merging a plurality of skip lists according to an embodiment of the present invention.

도 10에 도시된 바와 같이, 본 발명의 일 실시예에 따른 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치(100)는 제1 메모리(110), 제2 메모리(120) 및 프로세서(130)를 포함한다. 그러나 도시된 구성요소 모두가 필수 구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치(100)가 구현될 수도 있고, 그보다 적은 구성요소에 의해서도 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치(100)가 구현될 수 있다.As shown in FIG. 10 , the zipper compaction apparatus 100 for merging a plurality of skip lists according to an embodiment of the present invention includes a first memory 110 , a second memory 120 , and a processor 130 . includes However, not all illustrated components are essential components. The zipper compaction apparatus 100 for merging a plurality of skip lists may be implemented by more elements than the illustrated elements, and a zipper compaction apparatus for merging a plurality of skip lists by fewer elements ( 100) can be implemented.

이하, 도 10의 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치(100)의 각 구성요소들의 구체적인 구성 및 동작을 설명한다.Hereinafter, a detailed configuration and operation of each component of the zipper compaction apparatus 100 for merging a plurality of skip lists of FIG. 10 will be described.

제1 메모리(110)는 크기가 작은 스킵리스트와 크기가 큰 스킵리스트를 저장한다. 제1 메모리(110)는 특정 메모리로 한정되지 않으며, 비휘발성 메모리 또는 휘발성 메모리로 구현될 수 있다. The first memory 110 stores a skip list having a small size and a skip list having a large size. The first memory 110 is not limited to a specific memory and may be implemented as a non-volatile memory or a volatile memory.

제2 메모리(120)는 제1 메모리(110)에서 지퍼 컴팩션(Zipper Compaction)과 관련된 하나 이상의 프로그램을 저장한다. The second memory 120 stores one or more programs related to the zipper compaction in the first memory 110 .

프로세서(130)는 제2 메모리(120)에 저장된 하나 이상의 프로그램을 실행한다. 프로세서(130)는 크기가 작은 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 크기가 큰 스킵리스트에 삽입할 위치 정보를 스택에 저장하여 스킵리스트를 스캔하고, 저장된 위치 정보를 이용하여 크기가 작은 스킵리스트의 노드를 꼬리부터 머리까지 차례대로 크기가 큰 스킵리스트에 병합한다. The processor 130 executes one or more programs stored in the second memory 120 . The processor 130 scans the skip list by storing position information to insert the nodes of the small skip list into the large skip list sequentially from head to tail in the stack, and uses the stored position information to skip the small size. Merge the nodes of the list from tail to head into the skip list of larger size.

실시예들에 따르면, 프로세서(130)는 최하단 계층 포인터를 따라 크기가 작은 스킵리스트를 탐색하여 크기가 작은 스킵리스트의 노드를 크기가 큰 스킵리스트에 삽입할 위치 정보를 스택에 저장할 수 있다. According to embodiments, the processor 130 may search for a skip list with a small size along a pointer of a lowermost layer, and store information about a location for inserting a node of a small skip list into a large skip list in a stack.

실시예들에 따르면, 프로세서(130)는 크기가 작은 스킵리스트를 탐색하면서 삽입할 노드에서 각 계층의 포인터가 업데이트가 필요하면, 삽입할 크기가 작은 스킵리스트의 노드와 포인터 정보를 스택에 저장할 수 있다. According to embodiments, when the pointer of each layer needs to be updated in the node to be inserted while searching the skip list having a small size, the processor 130 may store information on the node and the pointer of the skip list having the small size to be inserted in the stack. have.

실시예들에 따르면, 프로세서(130)는 크기가 작은 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드를 방문하고 크기가 큰 스킵리스트에서 다음 노드를 삽입할 위치를 탐색할 수 있다. According to embodiments, the processor 130 may visit the next node by following the pointer of the lowermost layer of the small skip list and search for a position to insert the next node in the large skip list.

실시예들에 따르면, 프로세서(130)는 이전에 검색한 노드의 키 값이 현재에 검색한 노드의 키 값 보다 작으면, 헤드에서부터 검색하는 대신 이전의 가장 높은 계층부터 다시 검색할 수 있다. According to embodiments, if the key value of the previously searched node is smaller than the key value of the currently searched node, the processor 130 may search again from the previous highest layer instead of searching from the head.

실시예들에 따르면, 프로세서(130)는 스택에 저장된 위치 정보 꺼내어 이용하여 크기가 작은 스킵리스트의 노드를 최하단 포인터부터 크기가 큰 스킵리스트에 병합할 수 있다. According to embodiments, the processor 130 may retrieve and use the location information stored in the stack to merge the nodes of the skip list with the smallest size into the skip list with the largest size from the lowest pointer.

실시예들에 따르면, 프로세서(130)는 크기가 작은 스킵리스트의 노드의 최하단 계층 포인터를 업데이트한 이후 크기가 작은 스킵리스트의 노드의 상위 계층 포인터를 크기가 큰 스킵리스트의 노드를 가리키도록 업데이트할 수 있다. According to embodiments, the processor 130 updates the lowermost layer pointer of the node of the small skip list and then updates the upper layer pointer of the node of the small skip list to point to the node of the large skip list. can do.

실시예들에 따르면, 프로세서(130)는 크기가 작은 스킵리스트의 노드의 최상위 계층을 크기가 큰 스킵리스트의 꼬리 부분을 가리키도록 업데이트할 수 있다. According to embodiments, the processor 130 may update the uppermost layer of the node of the small skip list to point to the tail of the large skip list.

실시예들에 따르면, 프로세서(130)는 읽기 트랜잭션이 크기가 작은 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 읽기 쓰레드는 현재 검색하는 스킵리스트를 크기가 작은 스킵리스트로 인지하고, 검색하는 노드를 찾지 못하면, 컴팩션이 진행중인 크기가 큰 스킵리스트에서 탐색을 다시 시작할 수 있다. According to embodiments, the processor 130 temporarily stops the read transaction while searching the small skip list and resumes again, the read thread recognizes the currently searched skip list as a small skip list, and performs the search. If a node is not found, the search can resume on a large skiplist where compaction is in progress.

실시예들에 따르면, 프로세서(130)는 크기가 작은 스킵리스트의 모든 노드를 크기가 큰 스킵리스트에 병합하면 머리 노드와 꼬리 노드만 가지고 있는 크기가 작은 스킵리스트를 삭제할 수 있다. According to embodiments, the processor 130 may delete the small skip list having only the head node and the tail node by merging all nodes of the skip list with the small size into the skip list with the large size.

도 11 및 도 12는 본 발명의 일 실시예에 따른 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법에서의 스캔 단계와 병합 단계에 대한 순서도이다. 11 and 12 are flowcharts of a scanning step and a merging step in a zipper compaction method for merging a plurality of skip lists according to an embodiment of the present invention.

도 11 및 도 12에 도시된 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법은 지퍼 컴팩션 장치(100)에 의해 수행된다. 도 11에 도시된 스캔 단계(Scan Phase)를 설명하고, 도 12에 도시된 병합 단계(Merge Phase)를 설명하기로 한다. The zipper compaction method for merging a plurality of skip lists shown in FIGS. 11 and 12 is performed by the zipper compaction apparatus 100 . The scan phase shown in FIG. 11 will be described, and the merge phase shown in FIG. 12 will be described.

단계 S201에서, 지퍼 컴팩션 장치(100)는 스캔 단계를 시작한다. 여기서, 단계 S201에서, lowSkipList와 lowNode는 레벨 K-1의 크기가 작은 스킵리스트와 노드를 가리키고, upperSkipList와 upperNode는 레벨 K의 크기가 큰 스킵리스트와 노드를 가리킨다. In step S201, the zipper compaction apparatus 100 starts a scanning step. Here, in step S201, lowSkipList and lowNode indicate a skip list and node having a small size of level K-1, and upperSkipList and upperNode indicate a skip list and node having a large size of level K.

단계 S202에서, 지퍼 컴팩션 장치(100)는 (1) lowNode = lowSkipList.head.next, (2) Rightmost[] = upperSkipList.head.next, (3) curLayer = MaxLayer, (4) upperNode = upperSkipList.head 와 같이 설정한다. In step S202, the zipper compaction device 100 calculates (1) lowNode = lowSkipList.head.next, (2) Rightmost[] = upperSkipList.head.next, (3) curLayer = MaxLayer, (4) upperNode = upperSkipList. set as head.

단계 S203에서, 지퍼 컴팩션 장치(100)는 lowNode가 NULL인지를 확인한다. In step S203, the zipper compaction apparatus 100 checks whether lowNode is NULL.

단계 S204에서, 지퍼 컴팩션 장치(100)는 lowNode가 NULL이 아니면, curLayer이 0이 아니거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(Key)보다 작거나 같은지를 확인한다. In step S204, if the lowNode is not NULL, the zipper compaction apparatus 100 checks whether curLayer is not 0 or the key of the next node of upperNode is less than or equal to the key of lowNode.

단계 S205에서, 지퍼 컴팩션 장치(100)는 curLayer가 0이 아니거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(Key)보다 작거나 같으면, upperNode의 다음 노드가 꼬리(tail)이거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(key)보다 큰지를 확인한다. In step S205, the zipper compaction apparatus 100 determines that if curLayer is not 0 or the key of the next node of upperNode is less than or equal to the key of lowNode, the next node of upperNode is a tail or upperNode Checks whether the key of the next node of is greater than the key of lowNode.

단계 S206에서, 지퍼 컴팩션 장치(100)는 upperNode의 다음 노드가 꼬리(tail)이거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(key)보다 크지 않으면, (1) upperNode = upperNode.next[curLayer] 와 같이 upperSkipList의 다음 노드를 방문하고, (2) rightmost[curLayer] = upperNode 와 같이 현재 계층에서 upperNode를 가리켜야 하는 포인터를 rightmost 배열에 저장한다. 그리고 지퍼 컴팩션 장치(100)는 단계 S204를 수행한다. In step S206, the zipper compaction apparatus 100 determines that if the next node of upperNode is a tail or the key of the next node of upperNode is not greater than the key of lowNode, (1) upperNode = upperNode.next As in [curLayer] , the next node of upperSkipList is visited, and a pointer to the upperNode in the current layer is stored in the rightmost array as in (2) rightmost[curLayer] = upperNode . And the zipper compaction apparatus 100 performs step S204.

단계 S207에서, 지퍼 컴팩션 장치(100)는 upperNode의 다음 노드가 꼬리(tail)이거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(key)보다 크면, curLayer = curLayer - 1 과 같이 다음 계층을 탐색한다. 그리고 지퍼 컴팩션 장치(100)는 단계 S204를 수행한다. In step S207, if the next node of upperNode is a tail or the key of the next node of upperNode is greater than the key of lowNode, the zipper compaction device 100 determines the next layer as curLayer = curLayer - 1 explore And the zipper compaction apparatus 100 performs step S204.

한편, 단계 S208에서, 지퍼 컴팩션 장치(100)는 curLayer가 0이 아니거나 upperNode의 다음 노드의 키(key)가 lowNode의 키(Key)보다 크면, lowNode와 lowNode를 가리켜야 하는 rightmost[] 포인터들을 스택에 저장한다. On the other hand, in step S208, the zipper compaction device 100 has a rightmost[] pointer that should point to lowNode and lowNode if curLayer is not 0 or the key of the next node of upperNode is greater than the key of lowNode. store them on the stack.

단계 S209에서, 지퍼 컴팩션 장치(100)는 (1) lowNode = lowNode.next[0] 와 같이 lowNode의 다음 노드를 lowNode로 지정하고, (2) upperNode = rightmost[MaxLayer] 와 같이 upperNode 를 최상위 계층으로 설정하고, (3) curLayer = MaxLayer 와 같이 현재 레벨을 최상위 계층으로 설정한다. 그리고 지퍼 컴팩션 장치(100)는 단계 S203을 수행한다. In step S209, the zipper compaction apparatus 100 designates the next node of the lowNode as a lowNode as shown in (1) lowNode = lowNode.next[0], and (2) upperNode as the uppermost layer as shown in upperNode = rightmost[MaxLayer]. , and (3) curLayer = MaxLayer, setting the current level as the top layer. And the zipper compaction apparatus 100 performs step S203.

이후, 단계 S204에서, 지퍼 컴팩션 장치(100)는 lowNode가 NULL이면, 도 12에 도시된 병합 단계(Merge Phase)를 수행한다. Thereafter, in step S204 , if the lowNode is NULL, the zipper compaction apparatus 100 performs the merge phase shown in FIG. 12 .

한편, 도 12에 도시된 바와 같이, 단계 S301에서, 지퍼 컴팩션 장치(100)는 병합 단계를 시작한다. Meanwhile, as shown in FIG. 12 , in step S301 , the zipper compaction apparatus 100 starts the merging step.

단계 S302에서, 지퍼 컴팩션 장치(100)는 스택이 비어 있는지를 확인한다. In step S302, the zipper compaction apparatus 100 checks whether the stack is empty.

단계 S303에서, 지퍼 컴팩션 장치(100)는 스택이 비어 있지 않으면, (1) (lowNode, rightmost[]) 를 스택에서 꺼내고, (2) h (계층)을 가장 낮은 계층 0으로 설정한다. In step S303, if the stack is not empty, the zipper compaction apparatus 100 removes (1) (lowNode, rightmost[]) from the stack, and (2) sets h (layer) to the lowest layer 0.

단계 S304에서, 지퍼 컴팩션 장치(100)는 h가 lowNode의 최상위 계층인지를 확인한다. In step S304, the zipper compaction apparatus 100 checks whether h is the highest layer of lowNode.

단계 S305에서, 지퍼 컴팩션 장치(100)는 h가 lowNode의 최상위 계층이 아니면, rightmost[h]의 다음 노드의 키가 lowNode의 다음 노드의 키보다 작은 지를 확인한다. 지퍼 컴팩션 장치(100)는 h가 lowNode의 최상위 계층이면, 단계 S302를 수행한다. In step S305, if h is not the highest layer of lowNode, the zipper compaction apparatus 100 checks whether the key of the next node of rightmost[h] is smaller than the key of the next node of lowNode. The zipper compaction apparatus 100 performs step S302 when h is the highest layer of lowNode.

단계 S306에서, 지퍼 컴팩션 장치(100)는 rightmost[h]의 다음 노드의 키가 lowNode의 다음 노드의 키보다 작으면, (1) lowNode.next[h] = rightmost[h].next, (2) Rightmost[h].next = lowNode, (3) h=h+1 와 같이 수행하고, 단계 S304를 수행한다. 지퍼 컴팩션 장치(100)는 rightmost[h]의 다음 노드의 키가 lowNode의 다음 노드의 키보다 작지 않으면, 단계 S304를 수행한다. In step S306, the zipper compaction device 100 determines that if the key of the next node of rightmost[h] is smaller than the key of the next node of lowNode, (1) lowNode.next[h] = rightmost[h].next, ( 2) Rightmost[h].next = lowNode, (3) h=h+1 is performed, and step S304 is performed. If the key of the next node of rightmost[h] is not smaller than the key of the next node of lowNode, the zipper compaction apparatus 100 performs step S304.

한편, 단계 S307에서, 지퍼 컴팩션 장치(100)는 스택이 비어 있으면, 병합 단계를 종료한다. Meanwhile, in step S307, if the stack is empty, the zipper compaction apparatus 100 ends the merging step.

한편, 프로세서에 의해 실행될 때, 상기 프로세서로 하여금 방법을 실행하게 하는 명령어들을 저장하기 위한 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 방법은: 제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하는 스캔 단계; 및 상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는 단계를 포함하는, 비일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다. On the other hand, a non-transitory computer-readable storage medium for storing instructions that, when executed by a processor, cause the processor to execute a method, the method comprising: transferring a node of a first skiplist from head to tail into a second a scanning step of finding a position to be inserted into the skip list and sequentially storing the position information in a stack; and sequentially merging the nodes of the first skip list from the tail to the head into the second skip list using the stored location information.

한편, 본 발명의 일 실시예에 따르면, 이상에서 설명된 다양한 실시예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media)에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시예들에 따른 전자 장치(예: 전자 장치(A))를 포함할 수 있다. 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접, 또는 프로세서의 제어 하에 다른 구성요소들을 이용하여 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다. Meanwhile, according to an embodiment of the present invention, the various embodiments described above are implemented as software including instructions stored in a machine-readable storage media readable by a machine (eg, a computer). can be The device is a device capable of calling a stored command from a storage medium and operating according to the called command, and may include an electronic device (eg, the electronic device A) according to the disclosed embodiments. When the instruction is executed by the processor, the processor may perform a function corresponding to the instruction by using other components directly or under the control of the processor. Instructions may include code generated or executed by a compiler or interpreter. The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' means that the storage medium does not include a signal and is tangible, and does not distinguish that data is semi-permanently or temporarily stored in the storage medium.

또한, 본 발명의 일 실시예에 따르면, 이상에서 설명된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 온라인으로 배포될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.In addition, according to an embodiment of the present invention, the method according to the various embodiments described above may be provided by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. The computer program product may be distributed in the form of a machine-readable storage medium (eg, compact disc read only memory (CD-ROM)) or online through an application store (eg, Play Store™). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.

또한, 본 발명의 일 실시예에 따르면, 이상에서 설명된 다양한 실시예들은 소프트웨어(software), 하드웨어(hardware) 또는 이들의 조합을 이용하여 컴퓨터(computer) 또는 이와 유사한 장치로 읽을 수 있는 기록 매체 내에서 구현될 수 있다. 일부 경우에 있어 본 명세서에서 설명되는 실시예들이 프로세서 자체로 구현될 수 있다. 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 동작을 수행할 수 있다.In addition, according to an embodiment of the present invention, the various embodiments described above are stored in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof. can be implemented in In some cases, the embodiments described herein may be implemented by the processor itself. According to the software implementation, embodiments such as the procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.

한편, 상술한 다양한 실시예들에 따른 기기의 프로세싱 동작을 수행하기 위한 컴퓨터 명령어(computer instructions)는 비일시적 컴퓨터 판독 가능 매체(non-transitory computer-readable medium)에 저장될 수 있다. 이러한 비일시적 컴퓨터 판독 가능 매체에 저장된 컴퓨터 명령어는 특정 기기의 프로세서에 의해 실행되었을 때 상술한 다양한 실시예에 따른 기기에서의 처리 동작을 특정 기기가 수행하도록 한다. 비일시적 컴퓨터 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 비일시적 컴퓨터 판독 가능 매체의 구체적인 예로는, CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등이 있을 수 있다.Meanwhile, computer instructions for performing the processing operation of the device according to the above-described various embodiments may be stored in a non-transitory computer-readable medium. The computer instructions stored in the non-transitory computer-readable medium, when executed by the processor of the specific device, cause the specific device to perform the processing operation in the device according to the various embodiments described above. The non-transitory computer-readable medium refers to a medium that stores data semi-permanently, rather than a medium that stores data for a short moment, such as a register, cache, memory, etc., and can be read by a device. Specific examples of the non-transitory computer-readable medium may include a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.

또한, 상술한 다양한 실시예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.In addition, each of the components (eg, a module or a program) according to the above-described various embodiments may be composed of a single or a plurality of entities, and some of the above-described sub-components may be omitted, or other components may be omitted. Sub-components may be further included in various embodiments. Alternatively or additionally, some components (eg, a module or a program) may be integrated into a single entity to perform the same or similar functions performed by each corresponding component prior to integration. According to various embodiments, operations performed by a module, program, or other component are executed sequentially, parallel, iteratively, or heuristically, or at least some operations are executed in a different order, are omitted, or other operations are added. can be

이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 개시에 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In the above, preferred embodiments of the present invention have been illustrated and described, but the present invention is not limited to the specific embodiments described above, and is commonly used in the technical field pertaining to the present disclosure without departing from the gist of the present invention as claimed in the claims. Various modifications are possible by those having the knowledge of, of course, and these modifications should not be individually understood from the technical spirit or perspective of the present invention.

100: 지퍼 컴팩션 장치
110: 제1 메모리
120: 제2 메모리
130: 프로세서
100: zipper compaction device
110: first memory
120: second memory
130: processor

Claims (21)

지퍼 컴팩션 장치에 의해 수행되는 지퍼 컴팩션 방법에 있어서,
제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하는 스캔 단계; 및
상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는 단계를 포함하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
A zipper compaction method performed by a zipper compaction device, the method comprising:
a scanning step of finding positions at which nodes of the first skip list are to be inserted into a second skip list sequentially from head to tail, and sequentially storing position information in a stack; and
and sequentially merging the nodes of the first skip list from a tail to a head into a second skip list by using the stored location information.
제1항에 있어서,
상기 스캔 단계는,
최하단 계층 포인터를 따라 상기 제1 스킵리스트를 탐색하여 상기 제1 스킵리스트의 노드를 제2 스킵리스트에 삽입할 위치 정보를 스택에 저장하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The scanning step is
A zipper compaction method for merging a plurality of skip lists, wherein information on a location for inserting a node of the first skip list into a second skip list is stored in a stack by searching the first skip list along a lowermost hierarchical pointer.
제1항에 있어서,
상기 스캔 단계는,
상기 제1 스킵리스트를 탐색하면서 삽입할 노드에서 각 계층의 포인터가 업데이트가 필요하면, 삽입할 제1 스킵리스트의 노드와 포인터 정보를 스택에 저장하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The scanning step is
Zipper compaction for merging a plurality of skip lists by storing the node and pointer information of the first skip list to be inserted in a stack when the pointer of each layer needs to be updated at the node to be inserted while searching the first skip list Way.
제1항에 있어서,
상기 스캔 단계는,
제1 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드를 방문하고 제2 스킵리스트에서 다음 노드를 삽입할 위치를 탐색하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The scanning step is
A zipper compaction method for merging a plurality of skip lists, comprising visiting a next node along a pointer of a lowermost layer of a first skip list and searching for a position to insert a next node in a second skip list.
제1항에 있어서,
상기 스캔 단계는,
이전에 검색한 노드의 키 값이 현재에 검색한 노드의 키 값 보다 작으면, 헤드에서부터 검색하는 대신 가장 높은 계층의 이전 노드부터 다시 검색하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The scanning step is
A zipper compaction method for merging a plurality of skip lists, in which, if the key value of the previously searched node is smaller than the key value of the currently searched node, search again from the previous node of the highest hierarchy instead of searching from the head.
제1항에 있어서,
상기 병합하는 단계는,
상기 스택에 저장된 위치 정보를 꺼내어 이용하여 상기 제1 스킵리스트의 노드를 최하단 포인터부터 제2 스킵리스트에 병합하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The merging step is
A zipper compaction method for merging a plurality of skip lists, wherein the node of the first skip list is merged into a second skip list from the lowest pointer by using the location information stored in the stack.
제1항에 있어서,
상기 병합하는 단계는,
상기 제1 스킵리스트의 노드의 최하단 계층 포인터를 업데이트한 이후 상기 제1 스킵리스트의 노드의 상위 계층 포인터를 제2 스킵리스트의 노드를 가리키도록 업데이트하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The merging step is
Zipper compact for merging a plurality of skip lists, after updating the lowest layer pointer of the node of the first skip list, updating the upper layer pointer of the node of the first skip list to point to the node of the second skip list Sean method.
제1항에 있어서,
상기 병합하는 단계는,
상기 제1 스킵리스트의 노드의 최상위 계층을 제2 스킵리스트의 꼬리 부분을 가리키도록 업데이트하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
The merging step is
A zipper compaction method for merging a plurality of skip lists, wherein the uppermost layer of the node of the first skip list is updated to point to the tail of the second skip list.
제1항에 있어서,
읽기 트랜잭션이 제1 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 읽기 쓰레드는 현재 검색하는 스킵리스트를 제1 스킵리스트로 인지하고, 검색하는 노드를 찾지 못할 경우 병합이 진행중인 또는 병합이 끝난 제2 스킵리스트에서 탐색을 다시 시작하는 단계를 더 포함하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
If the read transaction is temporarily stopped while searching the first skiplist and resumes again, the read thread recognizes the currently searched skiplist as the first skiplist, and if it cannot find the node to be searched for, it is the first skiplist in which the merge is in progress or the merge is completed. 2 A zipper compaction method for merging a plurality of skiplists, further comprising the step of restarting the search in the skiplist.
제1항에 있어서,
상기 제1 스킵리스트의 모든 노드를 제2 스킵리스트에 병합하면 상기 제1 스킵리스트는 머리 노드와 꼬리 노드만을 가진 빈 스킵리스트가 되어, 상기 제1 스킵리스트를 삭제하는 단계를 더 포함하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 방법.
According to claim 1,
When all nodes of the first skip list are merged into a second skip list, the first skip list becomes an empty skip list having only a head node and a tail node, and the method further comprises the step of deleting the first skip list. Zipper compaction method for merging the skiplist of
제1 스킵리스트와 제2 스킵리스트를 저장하는 제1 메모리;
상기 영구 메모리에서 지퍼 컴팩션(Zipper Compaction)과 관련된 하나 이상의 프로그램을 저장하는 제2 메모리; 및
상기 저장된 하나 이상의 프로그램을 실행하는 프로세서를 포함하고,
상기 프로세서는, 상기 제1 메모리에서 제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하고,
상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
a first memory for storing the first skip list and the second skip list;
a second memory for storing one or more programs related to a zipper compaction in the permanent memory; and
a processor executing the stored one or more programs;
The processor finds a position in the first memory to insert the nodes of the first skip list into the second skip list sequentially from the head to the tail, and sequentially stores the location information in the stack,
A zipper compaction apparatus for merging a plurality of skip lists, sequentially merging nodes of the first skip list from a tail to a head into a second skip list using the stored location information.
제11항에 있어서,
상기 프로세서는,
최하단 계층 포인터를 따라 상기 제1 스킵리스트를 탐색하여 상기 제1 스킵리스트의 노드를 제2 스킵리스트에 삽입할 위치 정보를 스택에 저장하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
A zipper compaction apparatus for merging a plurality of skip lists, wherein information on a location for inserting a node of the first skip list into a second skip list is stored in a stack by searching the first skip list along a lowermost hierarchical pointer.
제11항에 있어서,
상기 프로세서는,
상기 제1 스킵리스트를 탐색하면서 삽입할 노드에서 각 계층의 포인터가 업데이트가 필요하면, 삽입할 제1 스킵리스트의 노드와 포인터 정보를 스택에 저장하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
Zipper compaction for merging a plurality of skip lists by storing the node and pointer information of the first skip list to be inserted in a stack when the pointer of each layer needs to be updated at the node to be inserted while searching the first skip list Device.
제11항에 있어서,
상기 프로세서는,
제1 스킵리스트의 최하단 계층의 포인터를 따라 다음 노드를 방문하고 제2 스킵리스트에서 다음 노드를 삽입할 위치를 탐색하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
A zipper compaction apparatus for merging a plurality of skip lists, which visits the next node along the pointer of the lowest layer of the first skip list and searches for a position to insert the next node in the second skip list.
제11항에 있어서,
상기 프로세서는,
이전에 검색한 노드의 키 값이 현재에 검색한 노드의 키 값 보다 작으면, 헤드에서부터 검색하는 대신 가장 높은 계층의 이전 노드부터 다시 검색하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
A zipper compaction device for merging a plurality of skip lists, in which, when the key value of the previously searched node is smaller than the key value of the currently searched node, the search is performed again from the previous node of the highest hierarchy instead of searching from the head.
제11항에 있어서,
상기 프로세서는,
상기 스택에 저장된 위치 정보를 꺼내어 이용하여 상기 제1 스킵리스트의 노드를 최하단 포인터부터 제2 스킵리스트에 병합하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
A zipper compaction apparatus for merging a plurality of skip lists, wherein the node of the first skip list is merged into a second skip list from the lowest pointer by using the location information stored in the stack.
제11항에 있어서,
상기 프로세서는,
상기 제1 스킵리스트의 노드의 최하단 계층 포인터를 업데이트한 이후 상기 제1 스킵리스트의 노드의 상위 계층 포인터를 제2 스킵리스트의 노드를 가리키도록 업데이트하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
Zipper compact for merging a plurality of skip lists, after updating the lowest layer pointer of the node of the first skip list, updating the upper layer pointer of the node of the first skip list to point to the node of the second skip list Sean device.
제11항에 있어서,
상기 프로세서는,
상기 제1 스킵리스트의 노드의 최상위 계층을 제2 스킵리스트의 꼬리 부분을 가리키도록 업데이트하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
A zipper compaction apparatus for merging a plurality of skip lists, for updating the uppermost layer of the node of the first skip list to point to the tail of the second skip list.
제11항에 있어서,
상기 프로세서는,
읽기 트랜잭션이 제1 스킵리스트를 검색하다가 일시적으로 중단되었고 다시 재개되면, 읽기 쓰레드는 현재 검색하는 스킵리스트를 제1 스킵리스트로 인지하고, 검색하는 노드를 찾지 못할 경우 병합이 진행중인 또는 병합이 끝난 제2 스킵리스트에서 탐색을 다시 시작하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
If the read transaction is temporarily stopped while searching the first skiplist and resumes again, the read thread recognizes the currently searched skiplist as the first skiplist, and if it cannot find the node to be searched for, it is the first skiplist in which the merge is in progress or the merge is completed. 2 Zipper compaction device for merging a plurality of skiplists, restarting the search in the skiplist.
제11항에 있어서,
상기 프로세서는,
상기 제1 스킵리스트의 모든 노드를 제2 스킵리스트에 병합하면 상기 제1 스킵리스트는 머리 노드와 꼬리 노드만을 가진 빈 스킵리스트가 되어, 상기 제1 스킵리스트를 삭제하는, 복수의 스킵리스트를 병합하기 위한 지퍼 컴팩션 장치.
12. The method of claim 11,
The processor is
When all nodes of the first skip list are merged into a second skip list, the first skip list becomes an empty skip list having only a head node and a tail node, and a plurality of skip lists are merged to delete the first skip list. Zipper compaction device for
프로세서에 의해 실행될 때, 상기 프로세서로 하여금 방법을 실행하게 하는 명령어들을 저장하기 위한 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 방법은:
제1 스킵리스트의 노드를 머리부터 꼬리까지 차례대로 제2 스킵리스트에 삽입할 위치를 찾아 위치 정보를 스택에 차례대로 저장하는 스캔 단계; 및
상기 저장된 위치 정보를 이용하여 상기 제1 스킵리스트의 노드를 꼬리부터 머리까지 제2 스킵리스트에 차례대로 병합하는 단계를 포함하는, 비일시적 컴퓨터 판독 가능한 저장 매체.
A non-transitory computer-readable storage medium for storing instructions that, when executed by a processor, cause the processor to execute a method, the method comprising:
a scanning step of finding positions at which nodes of the first skip list are to be inserted into a second skip list sequentially from head to tail, and sequentially storing position information in a stack; and
and sequentially merging the nodes of the first skip list from the tail to the head into the second skip list by using the stored location information.
KR1020210009759A 2021-01-22 2021-01-22 Zipper compaction method and apparatus for compacting the plural of skiplists KR102568662B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210009759A KR102568662B1 (en) 2021-01-22 2021-01-22 Zipper compaction method and apparatus for compacting the plural of skiplists

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210009759A KR102568662B1 (en) 2021-01-22 2021-01-22 Zipper compaction method and apparatus for compacting the plural of skiplists

Publications (2)

Publication Number Publication Date
KR20220106622A true KR20220106622A (en) 2022-07-29
KR102568662B1 KR102568662B1 (en) 2023-08-22

Family

ID=82606763

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210009759A KR102568662B1 (en) 2021-01-22 2021-01-22 Zipper compaction method and apparatus for compacting the plural of skiplists

Country Status (1)

Country Link
KR (1) KR102568662B1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080101216A (en) * 2007-05-16 2008-11-21 엔에이치엔(주) Method for searching information and system therefor
US20120136871A1 (en) * 2009-06-18 2012-05-31 Canon Kabushiki Kaisha Skip list generation
KR20160060550A (en) * 2014-11-20 2016-05-30 삼성전자주식회사 Page cache device and method for efficient mapping
CN108182151A (en) * 2018-01-24 2018-06-19 北京百度网讯科技有限公司 Sequential flow caches method, apparatus, storage medium and the terminal device with detection
US20200067713A1 (en) * 2015-06-02 2020-02-27 ALTR Solutions, Inc. Using a tree structure to segment and distribute records across one or more decentralized, acyclic graphs of cryptographic hash pointers
CN111221773A (en) * 2020-01-15 2020-06-02 华东师范大学 Data storage architecture method based on RMDA high-speed network and skip list

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080101216A (en) * 2007-05-16 2008-11-21 엔에이치엔(주) Method for searching information and system therefor
US20120136871A1 (en) * 2009-06-18 2012-05-31 Canon Kabushiki Kaisha Skip list generation
KR20160060550A (en) * 2014-11-20 2016-05-30 삼성전자주식회사 Page cache device and method for efficient mapping
US20200067713A1 (en) * 2015-06-02 2020-02-27 ALTR Solutions, Inc. Using a tree structure to segment and distribute records across one or more decentralized, acyclic graphs of cryptographic hash pointers
CN108182151A (en) * 2018-01-24 2018-06-19 北京百度网讯科技有限公司 Sequential flow caches method, apparatus, storage medium and the terminal device with detection
CN111221773A (en) * 2020-01-15 2020-06-02 华东师范大学 Data storage architecture method based on RMDA high-speed network and skip list

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
STANISLAWSKI Jerzy, et al, "Machine learning methods can replace 3D profile method in classification of amyloidogenic hexapeptides", BMC Bioinformatics 2013 1부.* *

Also Published As

Publication number Publication date
KR102568662B1 (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US4914569A (en) Method for concurrent record access, insertion, deletion and alteration using an index tree
JP5339507B2 (en) How to explore a tree structure
US8666952B2 (en) Optimized deletion and insertion for high-performance resizable RCU-protected hash tables
US20150227573A1 (en) Distributed, Transactional Key-Value Store
CN110990404A (en) Index data processing method and device and electronic equipment
CN106255962B (en) System and method for improved data structure storage
JP4101410B2 (en) Time version data storage device
CN111316255A (en) Data storage system and method for providing a data storage system
JP4825719B2 (en) Fast file attribute search
JP5108252B2 (en) Index updating method and system
KR20120082176A (en) Data processing method of database management system and system thereof
JPH11120051A (en) Computer system for correcting information in database and its correcting
KR102568662B1 (en) Zipper compaction method and apparatus for compacting the plural of skiplists
CN114282074B (en) Database operation method, device, equipment and storage medium
JP2005234945A (en) Concurrent execution control method and device
US20140325271A1 (en) Terminal device, information processing method, and computer program product
US11625386B2 (en) Fast skip list purge
JP3622443B2 (en) T-tree index construction method and apparatus, and storage medium storing T-tree index construction program
KR100205950B1 (en) Method for controlling simultaneity using by latch in storing system
JP2000066933A (en) Time series data management system
KR100786505B1 (en) Method for managing files stored in a portable terminal
JP3780772B2 (en) Database index creation device
JPH0283640A (en) Data base updating method
CN113778752A (en) Hash data storage method and device for data de-duplication
CN115599288A (en) Globally optimized key value storage method and device

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant