Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use JournalPointer

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use JournalPointer, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

The JournalPointer class description:

Class JournalPointer {

Int node_id; record MDS Rank

Int64_t pool_id; records the ID value of metadata pool

Inodeno_t front; records currently valid logs

Inodeno_t back; records the log of backup. Normally, back should be 0. If it is not 0, it means that there are outstanding log operations.

}

What the JournalPointer class writes to the cluster:

Front and back need to be written to the cluster.

Pool = metadata pool

Object_id = MDS_INO_LOG_POINTER_OFFSET+node_id+ ".0"

Methods of the JournalPointer class:

JournalPointer::load ()

| | _ _ get the object_ id value |

| _ _ Objecter::read_full (object_id, pool_id...) Read the front and backout values of JournalPointer from the cluster

| | _ _ decode (Q) parses front and backout values from the results returned by the cluster |

JournalPointer::save ()

| | _ _ encode (data) serializes front and backvalue to bufferlist |

| | _ _ get the object_ id value |

| | _ _ Objecter::write_full (object_id, pool_id,data) writes serialized front and backvalue to the cluster |

Thank you for reading this article carefully. I hope the article "how to use JournalPointer" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report