You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2018/04/03 02:30:33 UTC

[trafficserver] branch master updated: Doc: Fix warnings / errors in cache architecture.

This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new bcdf07e  Doc: Fix warnings / errors in cache architecture.
bcdf07e is described below

commit bcdf07ec995c3b5d56f4ee36b10cec04567c2a52
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Wed Mar 28 08:18:43 2018 -0500

    Doc: Fix warnings / errors in cache architecture.
---
 doc/developer-guide/api/types/SystemTypes.en.rst   | 11 ++-
 .../architecture/cache-store.en.rst                | 83 ----------------------
 .../cache-architecture/core-cache-functions.en.rst | 57 ++++++++++-----
 .../cache-architecture/data-structures.en.rst      |  4 ++
 4 files changed, 55 insertions(+), 100 deletions(-)

diff --git a/doc/developer-guide/api/types/SystemTypes.en.rst b/doc/developer-guide/api/types/SystemTypes.en.rst
index 8e84daf..9fdd1d3 100644
--- a/doc/developer-guide/api/types/SystemTypes.en.rst
+++ b/doc/developer-guide/api/types/SystemTypes.en.rst
@@ -75,7 +75,7 @@ These types are provided by the compiler ("built-in") or from a required operati
 
 .. cpp:type:: ssize_t
 
-   Signed integral type. 
+   Signed integral type.
 
 .. cpp:type:: unspecified_type
 
@@ -88,3 +88,12 @@ These types are provided by the compiler ("built-in") or from a required operati
 .. cpp:type:: va_list
 
    Variable Argument List.
+
+.. cpp:namespace-push:: std
+
+.. cpp:class:: template < typename T > vector
+
+   See `std::vector <http://en.cppreference.com/w/cpp/container/vector>`__.
+
+.. cpp:namespace-pop::
+
diff --git a/doc/developer-guide/architecture/cache-store.en.rst b/doc/developer-guide/architecture/cache-store.en.rst
deleted file mode 100644
index 2c88d2a..0000000
--- a/doc/developer-guide/architecture/cache-store.en.rst
+++ /dev/null
@@ -1,83 +0,0 @@
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-.. include:: ../../common.defs
-
-.. _developer-cache-store:
-
-.. default-domain:: cpp
-
-Cache Store
-******************
-
-Initialization
-==============
-
-:file:`storage.config` is read by :func:`Store::read_config` invoked from :code:`ink_cache_init`.
-
-Types
-=====
-
-.. var:: size_t STORE_BLOCK_SIZE = 8192
-
-   The metric for measuring the size of stripe storage allocation. Note this is very different from
-   :var:`CACHE_BLOCK_SIZE` which is the metric for *object* allocation.
-
-.. var:: size_t CACHE_BLOCK_SIZE = 512
-
-   The metric for object storage allocation. The amount of storage allocated for an object in the
-   cache is a multiple of this value.
-
-.. class:: span_diskid_t
-
-   Stores a 16 byte ID.
-
-.. class:: Span
-
-   :class:`Span` models a :term:`cache span`. This is a contiguous span of storage.
-
-   .. member:: int64_t blocks
-
-      Number of storage blocks in the span. See :var:`STORE_BLOCK_SIZE`.
-
-   .. member:: int64_t offset
-
-      Offset (in bytes)_ to the start of the span. This is used only if the base storage is a file.
-
-   .. member:: span_diskid_t disk_id
-
-      No idea what this is.
-
-.. class:: Store
-
-   A singleton containing all of the cache storage description.
-
-   .. member:: unsigned n_disks_in_config
-
-      The number of distinct devices in the configuration.
-
-   .. member:: unsigned n_disks
-
-      The number of valid and distinct devices in the configuration.
-
-   .. member:: Span** disk
-
-      List of spans.
-
-   .. member:: char * read_config()
-q
-      Read :file:`storage.config` and initialize the base state of the instance. The return value is :code:`nullptr` on success and a nul-terminated error string on error.
diff --git a/doc/developer-guide/cache-architecture/core-cache-functions.en.rst b/doc/developer-guide/cache-architecture/core-cache-functions.en.rst
index 762416b..892643f 100644
--- a/doc/developer-guide/cache-architecture/core-cache-functions.en.rst
+++ b/doc/developer-guide/cache-architecture/core-cache-functions.en.rst
@@ -16,6 +16,7 @@
    under the License.
 
 .. include:: ../../common.defs
+.. default-domain:: cpp
 
 .. _core_cache_functions:
 
@@ -32,10 +33,14 @@ Core Cache Constants
 Core Cache Types
 ================
 
+.. type:: span_diskid_t
+
+   Stores a 16 byte ID.
+
 .. cpp:class:: CacheKey
 
   The hash value for a cache object. Currently a 128 bit MD5 hash.
-  
+
 .. cpp:class:: EvacuationBlock
 
    A range of content to be evacuated.
@@ -43,30 +48,50 @@ Core Cache Types
 .. cpp:class:: CacheProcessor
 
    The singleton cache management object. This handles threads and global initialization for the cache.
-   
+
    .. cpp:member:: int start(int n_threads, size_t stacksize)
-   
+
       Starts the cache processing threads, :arg:`n_threads` are created each with a stack of size :arg:`stacksize`.
 
 .. cpp:class:: Span
 
-   A representation of a unit of cache storage, a single physical device, file, or directory.
+   :class:`Span` models a :term:`cache span`. This is a contiguous span of storage.
+
+   .. member:: int64_t blocks
+
+      Number of storage blocks in the span. See :var:`STORE_BLOCK_SIZE`.
+
+   .. member:: int64_t offset
+
+      Offset (in bytes)_ to the start of the span. This is used only if the base storage is a file.
+
+   .. member:: span_diskid_t disk_id
+
+      No idea what this is.
 
 .. cpp:class:: Store
 
-   A representation of a collection of cache storage.
-   
-   .. cpp:member:: Span ** disk
-   
-      List of :cpp:class:`Span` instances that describe the physical storage.
+   A singleton containing all of the cache storage description.
+
+   .. member:: unsigned n_disks_in_config
+
+      The number of distinct devices in the configuration.
+
+   .. member:: unsigned n_disks
+
+      The number of valid and distinct devices in the configuration.
+
+   .. member:: Span** disk
+
+      List of spans.
+
+   .. function:: char * read_config()
+
+      Read :file:`storage.config` and initialize the base state of the instance. The return value is :code:`nullptr` on success and a nul-terminated error string on error.
 
 .. cpp:class:: CacheDisk
 
    A representation of the physical device used for a :cpp:class:`Span`.
-  
-.. cpp:class:: CacheHostRecord
-
-   A record from :file:`hosting.config`.
 
 Core Cache Functions
 ====================
@@ -74,15 +99,15 @@ Core Cache Functions
 .. cpp:function:: int dir_probe(const CacheKey * key, Vol * d, Dir * result, Dir ** last_collision)
 
   Probe the stripe directory for a candidate directory entry.
-  
+
 .. cpp:function:: void build_vol_hash_table(CacheHostRecord * r)
 
    Based on the configuration record :arg:`r`, construct the global stripe assignment table.
-   
+
 .. cpp:function:: int cplist_reconfigure()
 
    Rebuild the assignment of stripes to volumes.
-   
+
 .. cpp:function:: void ink_cache_init(ModuleVersion v)
 
    Top level cache initialization logic.
diff --git a/doc/developer-guide/cache-architecture/data-structures.en.rst b/doc/developer-guide/cache-architecture/data-structures.en.rst
index 1f80a44..40a2734 100644
--- a/doc/developer-guide/cache-architecture/data-structures.en.rst
+++ b/doc/developer-guide/cache-architecture/data-structures.en.rst
@@ -31,6 +31,10 @@ Data Structures
    CacheHostRecord *-- "*" CacheVol : cp >
    CacheVol *-- "*" Stripe : Vol >
 
+.. var:: size_t STORE_BLOCK_SIZE = 8192
+
+   The storage unit for span and stripe metadata.
+
 .. class:: CacheHostTable
 
    A container that maps from a FQDN to a :class:`CacheHostRecord`. This is constructed from

-- 
To stop receiving notification emails like this one, please contact
amc@apache.org.