Skip to content

Commit ad3d71d

Browse files
committed
Merge remote-tracking branch 'mongodb/master'
2 parents ecabda9 + 6ea1d83 commit ad3d71d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1924
-623
lines changed

bin/builder_data.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
.. code-block:: makefile
1212
1313
-include $(output)/makefile.pdfs
14-
-include $(output)/makefile.tables
1514
-include $(output)/makefile.links
1615
-include $(output)/makefile.sphinx
1716
-include $(output)/makefile.releases
@@ -80,27 +79,6 @@
8079
# The elements in the ``texinfo`` list are the texinfo filenames generated by Sphinx.
8180
texinfo = [ 'mongodb-reference', 'mongodb-crud', 'mongodb-manual' ]
8281

83-
tables = [
84-
# The elements of the tuples in the ``pdfs`` list are:
85-
# 0. ``name``: the name of the source, without the .yaml extenison.
86-
# 1. ``makefile_block``: the name block of the makefile, which
87-
# captures which group of charts this file contributes to.
88-
#
89-
# (name, makefile_block),
90-
('$(rst-include)/table-sql-to-agg-terms', 'agg'),
91-
('$(rst-include)/table-sql-to-agg-examples', 'agg'),
92-
('$(rst-include)/table-sql-to-mongo-executables', 'sql'),
93-
('$(rst-include)/table-sql-to-mongo-terms', 'sql'),
94-
('$(rst-include)/table-sql-to-mongo-schema-examples', 'sql'),
95-
('$(rst-include)/table-sql-to-mongo-insert-examples', 'sql'),
96-
('$(rst-include)/table-sql-to-mongo-select-examples', 'sql'),
97-
('$(rst-include)/table-sql-to-mongo-update-examples', 'sql'),
98-
('$(rst-include)/table-sql-to-mongo-delete-examples', 'sql'),
99-
('$(rst-include)/table-lock-behavior-per-operation', 'concurrency'),
100-
('$(rst-include)/table-mongodb-extended-json', 'json'),
101-
('$(rst-include)/table-index-nav', 'struct'),
102-
]
103-
10482
sphinx = [
10583
# The items in the ``sphinx`` list are the name of the sphinx builder.
10684
#

bin/makefile-builder/pdfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def pdf_makefile(name, tag):
2828

2929
m.target(target='$(public-branch-output)/' + name_tagged + '.pdf',
3030
dependency='$(public-branch-output)/' + name_tagged + '-$(current-branch).pdf')
31-
m.job('$(build-tools)/create-link $(notdir $<) $(notdir $@) $@')
31+
m.job('$(build-tools)/create-link $(notdir $<) $(notdir $@) $(dir $@)')
3232

3333
m.comment('adding ' + name + '.pdf to the build dependency.')
3434
m.append_var('PDF_OUTPUT', '$(public-branch-output)/' + name_tagged + '.pdf')

bin/makefile-builder/tables.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

bin/makefile.content

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sphinx-content += manual-pdfs
22
sphinx-content += manual-info
3-
sphinx-content += $(public-branch-output)
3+
sphinx-content += $(public-branch-output)
44
sphinx-content += $(public-branch-output)/single
55
sphinx-content += $(public-branch-output)/single/index.html
66
sphinx-content += $(public-branch-output)/MongoDB-Manual.epub

bin/makefile.dynamic

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
-include $(output)/makefile.pdfs
55
-include $(output)/makefile.texinfo
6-
-include $(output)/makefile.tables
76
-include $(output)/makefile.links
87
-include $(output)/makefile.intersphinx
98
-include $(output)/makefile.sphinx

bin/makefile.tables

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
table-output = $(subst yaml,rst,$(shell find $(rst-include)/ -name "table-*.yaml"))
2+
3+
$(rst-include)/table-%.rst:$(rst-include)/table-%.yaml
4+
@$(PYTHONBIN) bin/table_builder.py $< $@
5+
@echo [table-builder]: generated $@ table for inclusion
6+
7+
.PHONY:tables clean-tables
8+
tables:$(table-output)
9+
@-git update-index --assume-unchanged
10+
@echo [tables]: cleansing git index of compiled tables
11+
clean-tables:
12+
@-rm -rf $(table-output)

conf.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
master_doc = 'contents'
4242
project = u'mongodb-manual'
4343
copyright = u'2011-' + meta['date'] + ', 10gen, Inc.'
44-
version = '2.2.2'
44+
version = '2.2.3'
4545
release = version
4646

4747
BREAK = '\n'
@@ -77,6 +77,27 @@
7777
'djangotoolbox' : ('http://djangotoolbox.readthedocs.org/en/latest/', '../build/djangotoolbox.inv'),
7878
}
7979

80+
languages = [
81+
("ar", "Arabic"),
82+
("cn", "Chinese"),
83+
("cs", "Czech"),
84+
("de", "German"),
85+
("es", "Spanish"),
86+
("fr", "French"),
87+
("hu", "Hungarian"),
88+
("id", "Indonesian"),
89+
("it", "Italian"),
90+
("jp", "Japanese"),
91+
("ko", "Korean"),
92+
("lt", "Lithuanian"),
93+
("pl", "Polish"),
94+
("pt", "Portuguese"),
95+
("ro", "Romanian"),
96+
("ru", "Russian"),
97+
("tr", "Turkish"),
98+
("uk", "Ukrainian")
99+
]
100+
80101
# -- Options for HTML output ---------------------------------------------------
81102

82103
html_theme = 'mongodb'
@@ -103,15 +124,20 @@
103124
'pdfpath': manual_edition_path + '.pdf',
104125
'epubpath': manual_edition_path + '.epub',
105126
'manual_path': meta['manual_path'],
127+
'translations': languages,
106128
'repo_name': 'docs',
107129
'jira_project': 'DOCS',
108130
'google_analytics': 'UA-7301842-8',
109131
'project': 'manual',
110132
}
111133

112134
html_sidebars = {
113-
'**': ['pagenav.html', 'formats.html', 'translations.html', 'wikisidebar.html'],
135+
'**': ['pagenav.html'],
114136
}
137+
html_sidebars['**'].append('intrasites.html')
138+
html_sidebars['**'].append('formats.html')
139+
# html_sidebars['**'].append('translations.html')
140+
html_sidebars['**'].append('wikisidebar.html')
115141

116142
# -- Options for LaTeX output --------------------------------------------------
117143

draft/multi-data-center-awareness.txt

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
.. the remainder of be dropped or completly rewritten as needed, or
3+
used in filling out the blanks in existing documentation.
4+
5+
Data Center Awareness Through Read Preferences and Write Concerns
6+
-----------------------------------------------------------------
7+
8+
Read and Write Preferences are driver features
9+
which control the conditions under which a driver reads or writes to a
10+
MongoDB database.
11+
You should verify that the specific driver you are using supports these
12+
features before utilizing them for data center awareness.
13+
14+
Read preferences control whether your application reads from the primary
15+
or a secondary or the *nearest* MongoDB instance in the current topology
16+
of the network.
17+
18+
Write concerns control how durable the replication of your data is,
19+
from insurance that at least one replica set member
20+
has the data through assurance that a majority or all members of a
21+
replica set have copies of the data.
22+
The MongoDB write concern is not comparable to a transaction, it controls
23+
how long your client application will wait for confirmation that
24+
an update has propagated to however many replica set members you require.
25+
26+
Read Preferences and Write Concerns are documented in
27+
:doc:`/applications/replication`.
28+
29+
In the context of data center awareness, read preferences can be used to
30+
control whether a client reads from a primary, a secondary, the nearest
31+
replica set member, or a custom preference composed of
32+
:ref:`replica set tags <replica-set-configuration-tag>`.
33+
34+
In parallel, you can set the write concern on a connection to ensure
35+
that data has been written to one or more members of the replica set, to
36+
a majority of members of the replica set, or to a custom write concern
37+
composed of replica set tags and a quantity of tagged members which must
38+
acknowledge the success of the write.
39+
40+
While write concerns can be set on a per-connection basis, you can also
41+
define a default write concern for a replica set by updating the
42+
:data:`~local.system.replset.settings.getLastErrorDefaults`
43+
setting of the replica set.
44+
45+
See :ref:`replica-set-configuration-tag-sets` for sample configurations
46+
of replica sets with tags.
47+
48+
Within a data center you can use a combination of read preferences and
49+
write concerns to manage where information is written to and where it is
50+
read from.
51+
52+
You could direct all read activity from a reporting tool to secondary
53+
members of a replica set, lessening the workload on your primary server,
54+
by using a read preference of :readmode:`secondaryPreferred`.
55+
56+
If your replica set members are distributed across multiple data centers
57+
you can utilize :readmode:`nearest` to direct reads to the closest
58+
replica set member, which may be a primary or secondary member of the
59+
replica set.
60+
61+
Write activities always start by writing to the primary member of the
62+
replica set. The :term:`write concern` affects how long your client will
63+
wait for confirmation that the data has been written to additional
64+
replica set members.
65+
66+
As of the :ref:`Fall 2012 driver update <driver-write-concern-change>`,
67+
officially supported MongoDB drivers will wait for confirmation that
68+
updates have been committed on the primary.
69+
You can specify to wait for additional members to acknowledge a write,
70+
by specifying a number or ``w:majority`` on your connection, or by
71+
changing the :data:`~local.system.replset.settings.getLastErrorDefaults`
72+
setting of the replica set.
73+
74+
Replica set tags can be combined with write operations to wait for
75+
confirmation that an update has been committed to members of the replica
76+
set matching the specified tags.
77+
78+
For example, you could tag your replica set members with tags identifying
79+
the rack they occupy in a datacenter, or the type of storage media
80+
(spinning disk, solid state drive, etc.).
81+
82+
.. TODO:: several examples TK.
83+
84+
.. _tag-aware-sharding:
85+
86+
Multi Data Center Awareness Through Tag Aware Sharding
87+
------------------------------------------------------
88+
89+
Shard tagging controls data location, and is complementary to but separate
90+
from replica set tagging. Where replica set tags affect read and write
91+
operations within a given replica set, shard tags determine which
92+
replica sets contain tagged ranges of data.
93+
94+
Given a shard key with good cardinality, you can assign tags to ranges
95+
of the shard key. You then assign specific ranges to specific shards.
96+
97+
For example, given a collection with documents containing some sort of
98+
country and national sub-division (state, province) and a shard key composed
99+
of those fields plus some unique identifier (perhaps the BSON ObjectId of
100+
the document), you could assign tag ranges to the shard keys based on
101+
country and sub-division and then assign those chunks to shards whose
102+
primaries are geographically closer to those geographic locations.
103+
104+
.. TODO:: examples

makefile

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ help:
3333
include bin/makefile.dynamic
3434
include bin/makefile.clean
3535
include bin/makefile.content
36+
include bin/makefile.tables
3637
include bin/makefile.push
3738

3839
############# Meta targets that control the build and publication process. #############
@@ -92,27 +93,19 @@ pdflatex-command = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction
9293

9394
# Uses 'latex' target to generate latex files.
9495
pdfs:$(subst .tex,.pdf,$(wildcard $(branch-output)/latex/*.tex))
95-
@echo [build]: ALL PDFLATEX BUILD ERRORS IGNORED.
9696
$(branch-output)/latex/%.tex:
9797
@sed $(SED_ARGS_FILE) -e $(LATEX_CORRECTION) -e $(LATEX_CORRECTION) -e $(LATEX_LINK_CORRECTION) $@
9898
@echo [latex]: fixing the Sphinx ouput of '$@'.
9999
%.pdf:%.tex
100-
@echo [pdf]: pdf compilation of $@, started at `date`.
101-
@touch $(basename $@)-pdflatex.log
102-
@-$(pdflatex-command) '$<' >> $(basename $@)-pdflatex.log
103-
@echo [pdf]: \(1/6\) pdflatex $<
104-
@-$(pdflatex-command) '$<' >> $(basename $@)-pdflatex.log
105-
@echo [pdf]: \(2/6\) pdflatex $<
106-
@-$(pdflatex-command) '$<' >> $(basename $@)-pdflatex.log
107-
@echo [pdf]: \(3/6\) pdflatex $<
108-
@-makeindex -s $(branch-output)/latex/python.ist '$(basename $<).idx' >> $(basename $@)-pdflatex.log 2>&1
109-
@echo [pdf]: \(4/6\) Indexing: $(basename $<).idx
110-
@-$(pdflatex-command) '$<' >> $(basename $@)-pdflatex.log
111-
@echo [pdf]: \(5/6\) pdflatex $<
112-
@-$(pdflatex-command) '$<' >> $(basename $@)-pdflatex.log
113-
@echo [pdf]: \(6/6\) pdflatex $<
114-
@echo [pdf]: see '$(basename $@)-pdflatex.log' for a full report of the pdf build process.
115-
@echo [pdf]: pdf compilation of $@, complete at `date`.
100+
@$(pdflatex-command) $(LATEXOPTS) '$<' >|$@.log
101+
@echo "[pdf]: (1/4) pdflatex $<"
102+
@-makeindex -s $(output)/latex/python.ist '$(basename $<).idx' >>$@.log 2>&1
103+
@echo "[pdf]: (2/4) Indexing: $(basename $<).idx"
104+
@$(pdflatex-command) $(LATEXOPTS) '$<' >>$@.log
105+
@echo "[pdf]: (3/4) pdflatex $<"
106+
@$(pdflatex-command) $(LATEXOPTS) '$<' >>$@.log
107+
@echo "[pdf]: (4/4) pdflatex $<"
108+
@echo "[pdf]: see '$@.log' for a full report of the pdf build process."
116109

117110
############# General purpose targets. Not used (directly) in the production build #############
118111
draft:draft-html

source/about.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,19 @@ current manual in the :hardlink:`release.txt` file.
9999
The most up-to-date, current, and stable version of the manual is
100100
always available at "http://docs.mongodb.org/manual/."
101101

102+
.. _meta-contributing:
103+
102104
Contributing to the Documentation
103105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104106

107+
.. this toctree should be moved to a not-yet-extant "translation"
108+
section of this page.
109+
110+
.. toctree::
111+
:hidden:
112+
113+
/meta/translation
114+
105115
The entire source of the documentation is available in the `docs
106116
repository <https://github.com/mongodb/docs>`_ along with all of the
107117
other `MongoDB project repositories on GitHub <http://github.com/mongodb>`_.

0 commit comments

Comments
 (0)