<commit_before>// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
// vim: ts=8 sw=2 smarttab
/*
 * Ceph - scalable distributed file system
 *
 * Copyright (C) 2004-2006 <NAME> <<EMAIL>>
 *
 * This is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1, as published by the Free Software 
 * Foundation.  See file COPYING.
 * 
 */

#ifndef __MDS_SESSIONMAP_H
#define __MDS_SESSIONMAP_H

#include <set>
using std::set;

#include <ext/hash_map>
using __gnu_cxx::hash_map;

#include "include/Context.h"
#include "include/xlist.h"
#include "include/elist.h"
#include "include/interval_set.h"
#include "mdstypes.h"

class CInode;
class MDRequest;

#include "CInode.h"
#include "Capability.h"
#include "msg/Message.h"


/* 
 * session
 */

class Session : public RefCountedObject {
  // -- state etc --
public:
  /*
                    
        <deleted> <-- closed <------------+--------+
             ^         |                  |        |
             |         v                  |        |
          killing <-- opening  <---+      |        |
             ^         |           |      |        |
             |         v           |      |        |
           stale <--> open --> closing ---+        |
                       ^                           |
                       |                           |
                      importing <------------------+

  */
  static const int STATE_CLOSED = 0;
  static const int STATE_OPENING = 1;   // journaling open
  static const int STATE_OPEN = 2;
  static const int STATE_CLOSING = 3;   // journaling close
  static const int STATE_STALE = 4;
  static const int STATE_KILLING = 5;
  static const int STATE_IMPORTING = 6;

  const char *get_state_name(int s) {
    switch (s) {
    case STATE_CLOSED: return "closed";<commit_msg>mds: importing, ugh<commit_after>// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
// vim: ts=8 sw=2 smarttab
/*
 * Ceph - scalable distributed file system
 *
 * Copyright (C) 2004-2006 <NAME> <<EMAIL>>
 *
 * This is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1, as published by the Free Software 
 * Foundation.  See file COPYING.
 * 
 */

#ifndef __MDS_SESSIONMAP_H
#define __MDS_SESSIONMAP_H

#include <set>
using std::set;

#include <ext/hash_map>
using __gnu_cxx::hash_map;

#include "include/Context.h"
#include "include/xlist.h"
#include "include/elist.h"
#include "include/interval_set.h"
#include "mdstypes.h"

class CInode;
class MDRequest;

#include "CInode.h"
#include "Capability.h"
#include "msg/Message.h"


/* 
 * session
 */

class Session : public RefCountedObject {
  // -- state etc --
public:
  /*
                    
        <deleted> <-- closed <------------+--------+
             ^         |                  |        |
             |         v                  |        |
          killing <-- opening  <---+      |        |
             ^         |   |       |      |        |
             |         v   |       |      |        |
           stale <--> open --> closing ---+        |
             |          ^| |    |                  |
             |          |v v    v                  |
             +--------> importing <----------------+

  */
  static const int STATE_CLOSED = 0;
  static const int STATE_OPENING = 1;   // journaling open
  static const int STATE_OPEN = 2;
  static const int STATE_CLOSING = 3;   // journaling close
  static const int STATE_STALE = 4;
  static const int STATE_KILLING = 5;
  static const int STATE_IMPORTING = 6;

  const char *get_state_name(int s) {
    switch (s) {
    case STATE_CLOSED: return "closed";
{'fraction_non_alphanumeric': 0.13742690058479531, 'fraction_numerical': 0.011164274322169059, 'mean_word_length': 1.5374241402562374, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '194761', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1142, 'n_words': 306}